Jump to content

Euphy

Members
  • Posts

    2997
  • Joined

  • Last visited

  • Days Won

    74

Everything posted by Euphy

  1. Yes, it's perfectly valid. Scripts in items are treated the same way as any other script. One important thing to note is that the OnEquip script activates after the itemscript.
  2. - script PoringEvent -1,{ OnMinute00: monster "prontera",0,0,"Poring",1002,1,strnpcinfo(3)+"::OnPoringDead"; announce "A special poring has spawned in Prontera!",0; end; OnPoringDead: // announce strcharinfo(0)+" has killed the Poring!",0; getitem 7539,1; end; }
  3. @Incarnation: Post your script here if you want me to test it.
  4. So many topics about this today... o.o; src\map\config\renewal.h: // #define RENEWAL_CAST Add "//" to disable, then recompile.
  5. Do you have mapserver errors...? The script worked when I tested it with 50+ items.
  6. @manuel02xx: See post #15. Change the "10" to any percentage.
  7. Why don't you just use the anti-flood client hex? o;
  8. @Incarnation: That was fixed in v1.4. The problem was that the mapserver wrongly detected an infinity loop and terminated the script before it could finish executing, so the new version has a freeloop to solve that. @critica: That doesn't have anything to do with classes though... XD
  9. src\map\config\renewal.h: // #define RENEWAL_CAST Add "//" to disable, then recompile.
  10. It was one of my first scripts and it's pretty messy, so I'm leaving it as-is.
  11. @xazax: The problem with doing SQL queries is that variables aren't updated right away. There's always some delay, and from what I've tested it ranges anywhere from a few seconds to minutes. I didn't realize we had an "@set" command, though. Wouldn't at least half the code for these commands be identical to the atcommand?
  12. Euphy

    Script Request

    vend_map,46,184,0 script dewa001 45,2,2,{ warp "SavePoint",0,0; end; }
  13. No, the getequip* commands will only work for equipped items. However, getinventorylist already creates card arrays which you can use directly: @inventorylist_card1[] - These four arrays contain card data for the items. @inventorylist_card2[] These data slots are also used to store names @inventorylist_card3[] inscribed on the items, so you can explicitly check @inventorylist_card4[] if the character owns an item made by a specific craftsman.
  14. <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; }
  15. @kangfredy: Delete this section: OnPCJobLvUpEvent: if (Class == 0 && JobLevel == 10 && countitem(3300) == 0) { set .@id,3300; goto GetToken; } if (JobLevel < 50) end; if (Class == 23 && JobLevel == 99 && countitem(3314) == 0) { set .@id,3314; goto GetToken; } if (Class == 4046 && JobLevel == 50 && countitem(3317) == 0) { set .@id,3317; goto GetToken; } if (Class == 4047 && JobLevel == 50 && countitem(3318) == 0) { set .@id,3318; goto GetToken; } if (Class == 4049 && JobLevel == 50 && countitem(3319) == 0) { set .@id,3319; goto GetToken; } if (JobLevel != 70) end; And replace it with: OnPCBaseLvUpEvent: if (BaseLevel < 99) end; // Your max base level here
  16. You should always receive some reward, unless you configured something wrong. You can try deleting this line: progressbar "",2; But it's almost certainly a config problem.
  17. Yup, that's why I wrote the script with that format! Remember to change "Total" at the end to the total number of arrays, though. And about the problem with the VSets, yeah, I don't really know what you wanted to display there...
  18. if (getd(".P"+.@i+"[0]")<=10 && .@k[0]!=.Default[0]) announce // ...
  19. 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; }
  20. @RaGERO: It's a very simple script, but percentages would really only work if they added to 100... o.o;
  21. I'm pretty sure no one's writing this because your percentages don't add up to 100. o.o; (And while you're at it, include the item IDs!)
  22. Wiki? :> http://rathena.org/wiki/GRF
  23. Problems with the old script: Half-utilizes the eA Job System, but not really. Doesn't fully work for Baby classes. Platinum Skills feature is poorly written. General inconsistencies in message display. The new script: Works for all classes/class types, by using the eA Job System. Much shorter, and somewhat easier to read (though that might be debatable xD). Very customizable. New: http://pastebin.com/raw.php?i=4sMv20de Current: https://rathena.svn....m/jobmaster.txt Done @ r16282.
  24. http://rathena.org/wiki/Custom_Maps
×
×
  • Create New...