Jump to content

Euphy

Members
  • Posts

    2997
  • Joined

  • Last visited

  • Days Won

    72

Community Answers

  1. Euphy's post in NPC dialogue wont open on custom NPC was marked as the answer   
    Always check your map-server for errors.

    new_1-1,57,114,2 <tab> script <tab> Greeter NPC <tab> 108,{
    Second question, include an OnTouch label with an x,y radius after sprite (in the header):

    new_1-1,57,114,2 script Greeter NPC 108,2,2,{ // ... close; OnTouch: npctalk "You stepped within 2 cells of me!"; end; }
  2. Euphy's post in Disguise Event found Bug. was marked as the answer   
    That's how PCRE works -- it compares your string with the definition as a substring. It's working as intended.
  3. Euphy's post in Hey how do i do this? was marked as the answer   
    Just on certain maps, or all maps?

    Certain maps:
    trunk/conf/mapflag/nosave.txt
    All maps:
    - script ToSavePoint -1,{ OnPCLogoutEvent: warp "SavePoint",0,0; end; }


  4. Euphy's post in IP check on battlegrounds was marked as the answer   
    The most practical way I can think of is making all the registration NPCs call an IP check function, which would do something like this:

    // callfunc "Check_IP","<map_name>"; function script Check_IP { // Get list of accounts with attached character's IP address. set .@size, query_sql("SELECT `account_id` FROM `login` WHERE `last_ip` = '"+getcharip()+"'",.@aid); // Passed check if only the attached player is returned. if (.@size < 2) return; // Check all online characters using the IP address if they're on the given map. set .@self, getcharid(3); for(set .@i,0; .@i<.@size; set .@i,.@i+1) { if (attachrid(.@aid[.@i])) { if (strcharinfo(3) == getarg(0)) { set .@name$, strcharinfo(0); attachrid(.@self); mes "Character "+.@name$+" is already logged into Battlegrounds with your IP."; close; } } } attachrid(.@self); // Passed check. return; }
    Note that you can't do an SQL query on `last_map` since that field doesn't update in real time.
  5. Euphy's post in Reseting character's whole look was marked as the answer   
    If you're running the script on the attached character, you can just do it using script commands, no need for SQL/relog:

    setlook 7,0; setlook 1,0; setlook 6,0;
    You only need an SQL query to modify values for offline characters (in which case @kick would still not be needed xP).
  6. Euphy's post in Battleground difference was marked as the answer   
    The custom battlegrounds are old scripts created before we received the official scripts. They work, but they're not as thorough (actually, I'm not too sure why we've kept them XD).
  7. Euphy's post in getmapuser for monster? was marked as the answer   
    prontera,150,150,0 script #sample 100,{ // Spawn 20 Porings if none are on the map. if (mobcount("prontera","#sample::OnMyMobDead") == 0) monster "prontera",150,150,"Poring",1002,20,"#sample::OnMyMobDead"; end; OnMyMobDead: // Label is needed to be able to count the monsters. end; }
  8. Euphy's post in Jobchanger was marked as the answer   
    See here.
  9. Euphy's post in Farming PvP points by killing in pvp problem. was marked as the answer   
    - script PVP_Points -1,{ OnPCKillEvent: if (killedrid == getcharid(3) || killedrid == last_kill) end; set last_kill, killedrid; set #CASHPOINTS, #CASHPOINTS+1; dispbottom "Gained a kill point! Total: "+#CASHPOINTS; end; }
  10. Euphy's post in Quest Malangdo was marked as the answer   
    Somehow I doubt that anyone will translate 8000 lines when we could just wait for an official script.
  11. Euphy's post in Hunting Missions was marked as the answer   
    I added a comment explaining that. o.o

    // Multipliers for Base Exp, Job Exp, and Zeny rewards.
  12. Euphy's post in novice suit was marked as the answer   
    {},{ changebase 0; },{ changebase Class; }
    http://rathena.org/wiki/Custom_Items
  13. Euphy's post in toren enchantment was marked as the answer   
    para_suv02 is set to 14 after finishing any quest by Instructor Ur and receiving the Paradise Advance Gears.
  14. Euphy's post in Ask Talking NPC was marked as the answer   
    npctalk "<message>"; sleep <ms>; // repeat
    Alternately,

    while(1) { npctalk "<message>"; sleep <ms>; }
  15. Euphy's post in request 1 click refiner was marked as the answer   
    <header> { setarray .@pos$[1],"Upper Headgear","Armor","Left hand","Right hand","Garment","Footgear","Left Accessory","Right Accessory","Mid Headgear","Lower Headgear"; set .@menu$,""; for (set .@i,1; .@i <= 10; set .@i,.@i+1) { if (getequipisequiped(.@i)) set .@menu$, .@menu$+.@pos$[.@i]+" [^0055FF"+getequipname(.@i)+"^000000]"; set .@menu$, .@menu$+":"; } set @i, select(.@menu$); if (!getequipisequiped(@i)) { message strcharinfo(0),"Nothing is equipped there!"; close; } if (getarg(0)) { if (!getequipisenableref(@i)) { message strcharinfo(0),getequipname(@i)+" cannot be refined."; close; } if (getequiprefinerycnt(@i) >= 10 ) { message strcharinfo(0),"+"+getequiprefinerycnt(@i)+" "+getequipname(@i)+" cannot be refined any further."; close; } } while (getequiprefinerycnt(@i) < 10) successrefitem @i; message strcharinfo(0),"All done!"; close; }
  16. Euphy's post in TCG Drainer - Very useful to most of the servers (just like Lotti Girl in pRO) was marked as the answer   
    Well, since you didn't supply proper percentages, still, here's the best I could do:

    <header> { mes "[Lotti Girl]"; mes "It costs "+.Cost[1]+"x "+getitemname(.Cost[0])+" to play."; if (countitem(.Cost[0]) < .Cost[1]) close; next; if(select("Deal me in!:No way...")==2) close; mes "[Lotti Girl]"; mes "Here we go..."; progressbar "",2; delitem .Cost[0], .Cost[1]; set .@i, rand(1,.Total); if (rand(1,100) > getd(".P"+.@i+"[0]")) { for(set .@j,0; .@j<getarraysize(.Default); set .@j,.@j+2) { getitem .Default[.@j], .Default[.@j+1]; if (!.@k[0]) setarray .@k[0], .Default[.@j], .Default[.@j+1]; } } else { for(set .@j,1; .@j<getarraysize(getd(".P"+.@i)); set .@j,.@j+2) { getitem getd(".P"+.@i+"["+.@j+"]"), getd(".P"+.@i+"["+(.@j+1)+"]"); if (!.@k[0]) setarray .@k[0], getd(".P"+.@i+"["+.@j+"]"), getd(".P"+.@i+"["+(.@j+1)+"]"); } } announce "Congratulations to "+strcharinfo(0)+" for getting "+.@k[1]+"x "+getitemname(.@k[0])+"!",0; specialeffect2 248; close; OnInit: // Format: <%>,<item ID>,<count>{,...}; setarray .P1[0],70,607,25; setarray .P2[0],70,13710,1; setarray .P3[0],40,5471,1; setarray .P4[0],40,5210,1; setarray .P5[0],40,5224,1; setarray .P6[0],50,2357,1,2524,1,2421,1,2115,1; setarray .P7[0],25,2701,1; setarray .P8[0],5,2394,1; setarray .Default[0],12214,1; setarray .Cost[0],7227,300; set .Total,8; end; }
  17. Euphy's post in skull into inventory was marked as the answer   
    You can disable that option and write a script that does it manually:

    - script Skulls -1,{ OnPCKillEvent: if (killedrid != getcharid(3)) getnameditem(7420,rid2name(killedrid)); end; }
  18. Euphy's post in Event Prize Giver NPC was marked as the answer   
    Sounds like a call for my Item Rewards NPC! c:
  19. Euphy's post in One Click All in One Mount NPC was marked as the answer   
    This is a great idea, actually... if you don't mind, I'm stealing it for my own scripts. ;3

    <header> { if (ismounting()) { message strcharinfo(0),"You must first remove your mount."; close; } else if ((eaclass()&EAJ_THIRDMASK==EAJ_RANGER) && !countitem(6124)) { if (!checkfalcon() && getskilllv(127) && !checkwug()) { if(select(" ~ Falcon: ~ Warg")==1) setfalcon; else getitem 6124,1; } else getitem 6124,1; } else if ((eaclass()&EAJ_THIRDMASK==EAJ_MECHANIC) && !checkcart()) { if (!checkmadogear() && getskilllv(2255)) { if(select(" ~ Cart: ~ Mado")==1) setcart; else setmadogear; } else setcart; } else if (!checkcart() && getskilllv(39)) setcart; else if (!checkfalcon() && getskilllv(127) && !checkwug()) setfalcon; else if (!checkriding() && getskilllv(63)) { if (eaclass()&EAJ_THIRDMASK==EAJ_RUNE_KNIGHT) setdragon; else setriding; } else if (!checkmadogear() && getskilllv(2255)) setmadogear; else { message strcharinfo(0),"You do not meet requirements to rent."; close; } close; }
  20. Euphy's post in TCG to Cash Exchange/Converter was marked as the answer   
    <header> { set .@i, countitem(7227); mes "[TCG Exchanger]"; mes "You have ^0055FF"+.@i+" TCG^000000."; if (!.@i) { mes "Please come back later."; close; } mes "I can trade ^FF00001 TCG^000000 for ^FF00005 Cash Points^000000."; next; if(select(" - Trade: - ^777777Leave^000000")==2) close; mes "[TCG Exchanger]"; mes "How many would you like to exchange?"; next; input .@j; mes "[TCG Exchanger]"; if (.@j < 1 || .@j > countitem(7227)) { mes "That's an invalid amount."; close; } mes "Are you sure you want to exchange ^0055FF"+.@j+" TCG^000000?"; if(select(" - Yes: - No")==2) close; mes " "; delitem 7227, .@j; set #CASHPOINTS, #CASHPOINTS+(.@j*5); mes "You now have "+#CASHPOINTS+" Cash Points."; close; }
  21. Euphy's post in Request Input Password on EXIT WARPER was marked as the answer   
    A password or random code...? Password should be self-explanatory, and here's for a random code:

    set .@str$,""; for(set .@i,0; .@i<10; set .@i,.@i+1) set .@str$, .@str$+rand(9); mes .@str$; input .@i$; if (.@i$ != .@str$) mes "Code invalid."; else warp "<map>",<x>,<y>; close;
  22. Euphy's post in Request SCRIPT :) was marked as the answer   
    <header> { L_Summon: monster "<map>",<x>,<y>,<name>,<ID>,1,strnpcinfo(3)+"::OnBossDead"; disablenpc "bosswarp"; end; OnBossDead: enablenpc "bosswarp"; sleep <ms>; // Respawn time goto L_Summon; end; } <from map> warp bosswarp 2,2,<to map>
  23. Euphy's post in Want to request auction system was marked as the answer   
    No... that's still exactly what you're describing.
    http://write.ratemyserver.net/ragnoark-online-how-to/the-auction-house-system/
  24. Euphy's post in Auto Broadcast every hour script was marked as the answer   
    - <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; }
  25. Euphy's post in Yggberry and ygg Seed delay in Woe only was marked as the answer   
    @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; },{},{}
×
×
  • Create New...