Jump to content

Sephus

Core Developers
  • Content Count

    229
  • Joined

  • Last visited

  • Days Won

    46

Everything posted by Sephus

  1. This is not good code practice but here's how you do it if( type == SHOP && value*0.75 < id->value_sell*1.24 && nameid != 607 ) { // Exploit possible: you can buy and sell back with profit ShowWarning("npc_parse_shop: Item %s [%d] discounted buying price (%d->%d) is less than overcharged selling price (%d->%d) in file '%s', line '%d'.n", id->name, nameid, value, (int)(value*0.75), id->value_sell, (int)(id->value_sell*1.24), filepath, strline(buffer,start-buffer)); if (retval) *retval = EXIT_FAILURE;} notice the && nameid != 607
  2. I haven't checked this entirely but maybe change if (rnd() % 10000 >= drop_rate) in mob.c to 100000 and keep default server rate 10x instead of 1x would it even out ?
  3. So since we're using constants as NPC's view IDs, what's the way we're using a monster ID as the view ID without getting a deprecated warning? - Edit - I'm so sorry for posting this in the wrong section, I thought I clicked on scripting support.
  4. Sephus

    Sleep on SRC

    Add a timer maybe?
  5. Ah okay, I followed the code in the patch he linked.
  6. So here's a cool script I made for a server long long time ago, it should work fine on Hercules as I've tested. Please do let me know if any bugs I'll try fixing them ASAP. Have fun~ What it does? It's a Super Leveling instance where you will be warped to an instance for you and your party to level up. Mobs will spawn at a rate and level of your choice (selectable through an NPC in the dungeon), there's a monster list for each level range configured in the script, feel free to edit the monsters per level It also includes a Happy Hour with 50% bonus (default), to change find and configure .HappyHourBonusRate from 150 (150%) to your liking. The current map used to create an instance is 1@mir, if you wish to change it just find 1@mir and replace every instance of it, it's simple. SuperLeveling.txt - v1.2 - Fixed a slight misplacement of the Happy Hour npc variable. - Fixed happy hour announcement command [Thanks AphrRO for pointing that out]
  7. Heyo, so here's a script I made for my server that existed a very long time ago. It's an item gather script that chooses 3 items to gather every day, when submitted, gives you rewards. It's very configurable as well. Feel free to suggest improvements to the script ~ quest_hunt.txt - v1.0
  8. Something along the lines of ... BUILDIN(setgodelay){ TBL_PC* sd; if(!(sd = script->rid2sd(st))) return false; sd->canlog_tick = iTimer->gettick(); return true;} and to initialize add BUILDIN_DEF(setgodelay,""), then save and recompile.
  9. If you compile for renewal it uses the renewal configuration for everything. If you want to customize your mobs, just add them from renewal database to pre-renewal db in db/pre-re/
  10. Well for the time being i'm using a temporary npc variable .@ , but if I wanted to set it as an NPC variable it's quite inconvenient. you don't need a loop to copy array you can directly access the .test array get value from array: getelementofarray(getvariableofnpc(.test,"testnpc"), index); set value to array: set( getelementofarray(getvariableofnpc(.test,"testnpc"),index), value); I know what you're saying, but if I needed to use the entire array conveniently in the function i'd have to recreate it using a loop within the function and assign the elements to a new array. Using that new array would also avoid calling many functions (getelement/variable) repeatedly. It would be nice to be able to pass a direct npc variable reference, I'm not sure what the source on this is yet, I will check it out.
  11. yeah but then you'd have to use a loop to re-create that array by adding each element, instead of copying from reference. Also what is getarg(0) in that?
  12. Sorry I didn't explain precisely, I'm talking about something along the lines of this for example - - script test 123,{ OnWhisperGlobal: setarray .@test[0],1,12,123; callfunc "abc",.@test; end;}function script abc { copyarray .@test,getarg(0); dispbottom ""+.@test[1]; return;} This works, just not for npc variables, like .test
  13. Is this possible on hercules? I only ask because the wiki states it isn't. - Edit - nvm, tested this, doesn't work. - Edit 2 - Also, is there a way to check if an getarg(n) exists, if say the variable .@abc is 0 in callfunc "abc",.@abc; ?
  14. is there a remedy to the pet feeding crash for this client ?
  15. Yes i've encountered the same issue, I don't get how a pull request can be merged without checking if the feature or file thoroughly. Some faulty code in itemdb.c/h, not bothered to check where exactly yet, i'll help out later if i can.
  16. Hey Aeomin, I'm using thor patcher on a mac through crossover in a WinXP Service Pack 3 bottle... everything works fine except while patching for over 10-20seconds it gives an error... below is the bug report if you can help me out i'd be very grateful. Also another issue i'm facing is with the config generator, where i can't drop the file as it's working in a wine bottle (crossover on iMac)... tried dropping in wine explorer aswell but it won't.. so if you could please make it possible to save the config file by typing in the destination folder it'd be divine !
  17. Hello, I'm not sure if this was asked before but If we use the hex the keys that have passed for the clients with broken keys using NEMO will it work ? for example if i use the keys of 20130618 for 20130807 . If not, is there any stable client with a working bank feature and passed keys?
  18. backtrace full? 0x0 doesn't show anything. gdb map-server core.xxxxbt full
  19. Thank you v much guys, I've used db->mexp for now as ->spawn->state.boss would only work for scripted spawns.
  20. Yeah this case sensitivity for variables is a pain xD although, if i might intrude, where does this originate from? [Notice]: Conflicting item/script var 'Zeny', prioritising the script var
  21. I'm trying to check if the target is a boss (MVP) mob, is_boss(bl) returns the mode which is also used for mini bosses, I need to check if the bl is MVP only. Thank you and any help is much appreciated!
  22. I'm trying to process the mac address parameter but it seems rocred doesn't send it in or read it for me, debug shows : token: mac=000000000000&key=mypswd I'm running it in crossover 12 on osx 10.9. Awesome tool btw.
  23. Awesome feature, hope it becomes fully functional asap. What is the % of completion on this though i'd like to know?
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.