Jump to content

Euphy

Members
  • Posts

    2997
  • Joined

  • Last visited

  • Days Won

    74

Everything posted by Euphy

  1. Since monster summon commands include x,y coordinates, you could set those using a variable beforehand and call that variable in the announce.
  2. It's inherently insecure to allow closing login/char servers through a mapserver command, especially since you can run multiple mapservers per login. o.o
  3. *getmapxy("<variable for map name>",<variable for x>,<variable for y>,<type>{,"<search string>"}) 0 - Character object 1 - NPC object 2 - Pet object 3 - Monster object. While 3 is meant to look for a monster object, no searching will be done if you specify type 3, and the function will always return -1. Afaik, "search string" won't work with monsters. What exactly are you trying to do?
  4. @Joey: No, "close" ends the script. The label is activated separately (through a timer).
  5. Uh... @mapexit?
  6. Yup, as Joey posted, add a "sleep2" command before each warp. Note that I only used Go() for towns, so add it in the Pick() function as well. *sleep2 {<milliseconds>};
  7. No, there isn't any "limiting" argument. But it should be easy to specify areas to spawn monsters, since x1,x2,y1,y2 makes nice little rectangles~
  8. My warper in the SVN right now includes all the new maps. o: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk/npc/custom/warper.txt
  9. The "for" loop needs to go up to 20, for the record, or you might run into problems in other equip slots (unlikely, but it should cover all cases). for(set .@i,0; .@i<20; set .@i,.@i+1){
  10. Does it work if you set the loop count higher (increase 20 to, say, 40)? If it does, a way to optimize would be replacing this: set .@j, rand(1,10); With: if (.@i<10) set .@j, rand(1,10); else set .@j, .@i-9;
  11. You don't really need the "if" brackets and "else end", since the script I posted would work fine. And currently your conditional would always activate, since the chance is always >= 1... did you mean "&&"? (That part isn't needed at all, actually.) <NPC Header> { OnNPCKillEvent: if (rand(1,100) > 5) end; // 5% chance to continue the script for (set .@i,0; .@i<20; set .@i,.@i+1) { set .@j, rand(1,10); if (getequipisequiped(.@j) && getequiprefinerycnt(.@j) < 100) { successrefitem .@j; end; } } end; }
  12. Where I wrote "// condition to continue", all you'd need is something like: if (.@chance > 5) end; // 5% chance to continue the script The rest of the script loops up to 20 times (you can change that) to find a refineable slot/item.
  13. @Jb Roxas: Fill out the full config for only ONE shop. Delete all of this from the others: Then at the beginning of each script, delete this section: if(.Shops$ != "") set .@i,1; else { set .@menu$,""; for(set .@i,1; .@i<=getarraysize(.Shops$); set .@i,.@i+1) set .@menu$, .@menu$+.Shops$[.@i]+":"; set .@i, select(.@menu$); } dispbottom "Select one item at a time."; callshop "qshop"+.@i,1; npcshopattach "qshop"+.@i; And write something like... callshop "<qshop1, qshop2, etc. (in order)>",1; npcshopattach "<same>";
  14. There already is an official auction system, exactly as you described. o.o; https://rathena.svn.sourceforge.net/svnroot/rathena/trunk/npc/other/auction.txt
  15. The concept is correct. There are a few things you're misinterpreting, though: You're setting permanent character variables for everything. Since everything is temporary, you would want to use temporary scope variables, which start in ".@". A "for" loop is structured in three parts: initialization, condition to loop, and variable increase per loop, i.e.: for( set .@i,0; // Initialization .@i < 10; // Loop until .@i hits 10 set .@i,.@i+1 // Increase .@i by 1 each time ) So the fixed code would be something like: OnNPCKillEvent: set .@chance, rand(1,100); // condition to continue for (set .@i,0; .@i<20; set .@i,.@i+1) { // 20: Prevents infinity loop if nothing is equipped set .@j, rand(1,10); if (getequipisequiped(.@j) && getequiprefinerycnt(.@j) < 100) { successrefitem .@j; end; } } end;
  16. Small mistakes: instead of "end", use "close" after warping because you had a text box open. Also, the town warps don't include any end statement at all... That aside, a few sections of this could be heavily condensed. For instance, instead of writing: set lastmap$,"prontera"; set lastx,156; set lasty,187; warp "prontera",156,187; break; You could write: warp "prontera",156,187; break; // [other cases] } getmapxy(lastmap$,lastx,lasty,0); close; Also, instead of putting this Zeny check for every line: if (Zeny < 1000) goto NoZenys; You could end the script immediately if the player has no Zeny. mes "Please be aware there is a small charge of 1000z for using my services"; if (Zeny < 1000) close;
  17. It's like a clock. 00 is the start and end of every hour. o;
  18. "OnMinuteXX" triggers the script every hour at minute XX. You can change that to whatever you want (00-59).
  19. @elcontrol00: - <tab> script <tab> PLogin <tab> -1,{ OnPCLoginEvent: if(select("Broadcast Login:Cancel")==1) announce "The player "+strcharinfo(0)+" has just connected!",0; close; }
  20. - <tab> script <tab> HourlyAnnounce <tab> -1,{ OnInit: setarray .Messages$[0],"Welcome!","(type your messages here)","Etc."; end; OnMinute00: announce .Messages$[rand(getarraysize(.Messages$))],0; end; }
  21. You're missing the event trigger, and you don't need to include map coordinates. - <tab> script <tab> PLogin <tab> -1,{ OnPCLoginEvent: announce "The player "+strcharinfo(0)+" has just connected!",0; end; }
  22. Yeah, you'd have to do it using an SQL query. Update all values to zero or "" where `char` (or similar) == character ID.
  23. @SlashGeeGee: Almost! You didn't include a check for WOE SE, and the variable shouldn't be permanent. { if((agitcheck() || agitcheck2()) && (@y1 > gettimetick(2))) end; set @y1, gettimetick(2)+<seconds>; percentheal 100,100; },{},{}
  24. // ... addtimer 180000,strnpcinfo(3)+"::OnExit"; warp "<map_name>",<x>,<y>; close; OnExit: warp "SavePoint",0,0; end; OnPCDieEvent: if (strcharinfo(3)=="<map_name>") warp "SavePoint",0,0; end;
  25. Euphy

    card prefix

    data\cardprefixnametable.txt & data\cardpostfixnametable.txt
×
×
  • Create New...