Jump to content

Z3R0

Members
  • Posts

    615
  • Joined

  • Last visited

  • Days Won

    11

Everything posted by Z3R0

  1. I don't have my scripting command reference on me via mobile... But... OnPCLogoutEvent: Get value of timer... And play it in a perm char var... Then OnPCLoginEvent: first check for the existence of the perm char var... And if it exists... Addtimer... For .s_time - permcl char var... Else not exist... .s_time Also you will need to make sure to clear that perm char var on hourly pickup, or whenever else in the script the timer is reset or added... But it should work just fine
  2. Not an expert in waiting rooms... but it could have something to do with the quotes around the npc names... ".test$" it ".test$" not "value of .test$" ... Just a thought ? There are SEVERAL instances of that everywhere...
  3. Sample is already given in the script look for other OnTimers there is probably one for event completed... If there is u can probably change it to OnTimer15000
  4. You will need to setup an OnTimer15000: with that, check if the Event is active, if it hasn't already been guessed, end the event and restart it later OnClock####: etc
  5. if ( countitem(#) || countitem(#) ) { // DO STUFF }
  6. Please be a little more specific, I do not understand what you are exactly asking for. Thanks, Z3R0
  7. Literally change 5 to 10? What's the problem?
  8. Z3R0

    detect IP

    absolutely! If using an SQL Server which I think is common now-a-days you can do a simple query for the character login information for last_ip (don't know exactly what the column is...) From that extraction you should be able to do whatever you want to do from there...
  9. Instead of using select... use prompt Catch the 255 response as "cancel / closed" and give the box back to the player Regarding the menu they have there, that seems to be a custom client menu (no idea)
  10. You would simply have 1 npc with multiple functions... - script StatTracker -1,{ OnPCLoginEvent: // Gather Information from SQL, store in @vars OnPCLogoutEvent: // Push @vars back to SQL OnPCKillEvent: // Increase @pvp vars + 1 OnNPCKillEvent: // Increase @mobs killed + 1 OnPCDieEvent: // Decrease Death Vars + 1 } Something similar to that
  11. According to https://github.com/rathena/rathena/blob/master/doc/script_commands.txt *unitskilluseid I think you need to either set a target or coordinates for that particular skill, because that skill is a clickable targetable skill on the ground? ... I could be wrong, but worth a shot? maybe just for testing purposes try to target ```unitskilluseid .wBossId, WZ_STORMGUST, 5, 125, 155;``` can't hurt?
  12. Just have to say, full agree. Most NPC's can easily call an OnInit: function, that serves as the "basis" to pull information from SQL... This is a on time call, but grants you the ability to manipulate the server on the "fly" without having to deal with remembering what variables are what... You can make a change to the DB, call a refresh method and BAM, settings updated... (almost too magical...) Any time you are going to be doing cross game-browser, chances are you are going to need a SQL Table to handle the data... but like Skorm said, making sure it's not hammering it is definitely something to note... For instance, you don't want a click handler calling the DB every time someone clicks the NPC... (ew, no)... Now, say for instance it runs after a PVP Event... ok, well that's 1 time per event... not horrible... So yes, while you may need local and npc and temporary variables to manage the workings of the script, by all means, push them to sql when complete so you can query that data from your web browser or retrieve it later with a refresh function
  13. ... atoi(string) == integer value Not will return 0 even if not a valid number
  14. Anything is possible. On quest acceptance instead of getitem... store a variable array on the char... Starry qShopStuff[0], .@iemid, 20170901,daytimetick; This integer is the following format... Year month day hour minute You specify it backwards that way you can compare it... If getarraysize(qShopStuff) then they have an open quest... claim it... Once claim attempt compare to current year month day ... if > 0 then it's been a day or more ok to claim, if 0 then compare time tick to 120000... if >= then it's ok to claim, else wait... Getitem qShopStuff[0] Deletearray qShopStuff[0], getarraysize(qShopStuff); Goodluck and happy hunting!
  15. *setcell "<map name>",<x1>,<y1>,<x2>,<y2>,<type>,<flag>; Example: setcell "schg_cas05",114,51,125,51,cell_walkable,0; use 1 or 0 to remove cell_walkable 0 is cannot walk, 1 is can
  16. Yes, the array is registered with the following information char_id | name of variable | index of array | value so for instance, if you create array on character: setarray charArray[0], 1, 2, 3; you will have 3 values for 1 character... 150001 | charArray | 0 | 1 150001 | charArray | 1 | 2 150001 | charArray | 2 | 3
  17. Well.. 1. I personally wouldn't give players the power to host events anymore... too much favortism... 2. Abusing it is probably going to happen.. unless your gm's are really awesome... but even then... 3. They are GM's, what items could they possibly want that they couldn't make? (Unless they are strictly Event GM's) ... 4. I personally instead of granting points per event, I would record in a SQL Log when they gave out rewards and to who, and monitor it and then you can just give them whatever item... or what not... - Not something I think should really exist anymore...
  18. I'm actually working on this now, taking a small break from my other project. I believe I can get this done in about 1-2 days... PM me, and I will send you a link to my repo, so you can follow progress
  19. Might be interested in attempting it, however I am working on some other projects right now, so if no one else offers to help, I can look at it when I have the time, doesn't appear to be too complicated.
  20. How do the GM's host the events? They start it via an NPC?
  21. Stolao, after looking the code in that function there are missing brackets... in F_ApplyOption.txt Line 56: setrandomoption(getarg(0,9),0,rand(RDMOPT_BODY_ATTR_NOTHING,RDMOPT_BODY_ATTR_UNDEAD),1,1; Missing an ending ) Same with the setrandomoption() below it haven't really looked deeper
  22. 1st one can be "simulated" setarray( getd( "@array_" + "string"), 0, 1, 2, 3, 4; ); // this will give you @array_string[#] 2nd, I found this out earlier, no, switch does not work with strings..., however what I found is that if you are setting strings for a switch, something is wrong... You can usually use a lookup array for the string and determine which index value it is in order to "case" it properly
  23. Would you want each item to have a different % chance of creation or ALL items? Would each item get the same "additional" reward? Would each item get the same "fail" reward?
  24. Right but I am assuming viper players use either a warp or npc to get to that map... meaning u could record all the charid... that go there into an array... using a check say every OnMinute15: loop through array and delete any chars from the array that are no longer logged in or on that map... and check their expire times... if their time is expired then boot em... if they onpcloadmapevent ... meaning they logged out on that map and warped back in check their viper and either kick em if expired or add their code back into the array
×
×
  • Create New...