-
Posts
2997 -
Joined
-
Last visited
-
Days Won
74
Content Type
Profiles
Forums
Downloads
Jobs Available
Server Database
Third-Party Services
Top Guides
Store
Everything posted by Euphy
-
how to make npc script with required equiped item.
Euphy replied to Brynner's question in Scripting Support
if (!isequipped(<ID>{,<ID>,...})) { mes "You need to have _____ equipped to continue."; close; } // script resumes -
It should be reading a server.dat file (or something similar) in your Ragnarok folder to get the patch number. Do you have one, and if so, what are the contents?
-
if (BaseLevel != 1000) { mes "I can't help you until you've hit level 1000."; close; } mes "Do you want to reset your stats?"; if(select("Yes!:No.")==2) close; ResetStatus; set StatusPoint, 32000; close;
-
<header> { percentheal 100,100; if (BaseLevel < 900) { sc_start 32,240000,10; sc_start 22,240000,10; sc_start 20,240000,10; sc_start 35,240000,10; sc_start 43,240000,10; sc_start 44,240000,10; skilleffect 112,0; sc_start 45,240000,10; skilleffect 113,0; sc_start 46,240000,10; sc_start 23,240000,10; sc_start 125,240000,10; skilleffect 74,0;sc_start 40,240000,10; sc_start 118,240000,10; } else { specialeffect2 37; sc_start SC_INCREASEAGI,240000,10; specialeffect2 42; sc_start SC_BLESSING,240000,10; } end; } It's messy, sorry.
-
db\pre-re or re\mob_db.txt // ID,Sprite_Name,kROName,iROName,LV,HP,SP,EXP,JEXP, ...
-
PacketParser - Yommys Amazing Ragnarok Packet Analyzer Framework
Euphy replied to Yommy's topic in Project Releases
Oh my god, real-time NPC stealing? You are a genius. o_o -
Technically you can leave the NPC name out, create a weird label name that no other NPCs use, and write: donpcevent "::OnUncommonLabelName"; I'm almost positive it's more efficient to use a loop, though, as goddameit suggested. On another note, all of your duplicates have the same name, which will give you 137 nice yellow warning messages when you boot.
-
@charon: It's the "Zeny cost" argument. Add(<shop number>,<reward ID>,<reward amount>,<Zeny cost>,<point cost>,<required item ID>,<required item amount>{,...});
-
Third jobs are available no matter if you have Renewal enabled or disabled.
-
Alright, that makes sense. At least it'll prevent any confusion. Thanks a lot. c:
-
Need NPC jobchange For Kagerou and Oborou
Euphy replied to IusReservoir's question in Script Requests
Do those classes even work...? Once they're fully implemented I'll add it to the Job Changer in the SVN, but for now the classes won't really get you anywhere. -
You're amazing. Thank you~ Couldn't you only use one command, though? Because variable types are defined by prefixes, can't you read the variable type first before processing the ID? I really don't know C at all, so correct me if I'm wrong.
-
Taken from Annie's post on eA, query_sql "SELECT account_id FROM `char` WHERE online = 1 limit 128", .@result; for(set .@i,0; .@i<getarraysize(.@result); set .@i,.@i+1) if (attachrid(.@result[.@i])) cutin "<filename>",<position>;
-
@Paulinds: Here you go - http://upaste.me/raw/8cf7503130022f6 prontera,163,167,4 script Fusion Master 808,{ mes "[Fusion Master]"; mes "After ten long years of searching,"; mes "I've finally come across a way to"; mes "make equipment stronger than"; mes "anyone would've thought..."; next; switch(select("Keep listening...:Fuse items:^777777Cancel^000000")) { case 1: mes "[Fusion Master]"; mes "The process is called ^0055FFFusion^000000."; mes "With it, I can combine two pieces"; mes "of equipment, doubling its"; mes "strength. Of course, there is a"; mes "chance I might fail... ^FF0000and"; mes "your equipment will break.^000000"; next; case 2: mes "[Fusion Master]"; if (Zeny < .Price) { mes "It costs "+.Price+"z to fuse items. Come back later."; close; } mes "What would you like to fuse?"; if (.Price) mes "Each attempt will cost "+.Price+"z."; next; set .@menu$,""; for(set .@i,0; .@i<getarraysize(.Items); set .@i,.@i+3) set .@menu$, .@menu$+((countitem(.Items[.@i+1])?"^0055FF":"^FF0000"))+getitemname(.Items[.@i+1])+"^000000 & "+((countitem(.Items[.@i+2])?"^0055FF":"^FF0000"))+getitemname(.Items[.@i+2])+":"; set .@i, (select(.@menu$)-1)*3; mes "[Fusion Master]"; mes "^0055FF"+getitemname(.Items[.@i+2])+"^000000 ~~> ^0055FF"+getitemname(.Items[.@i+1])+"^000000"; mes " "; if (!countitem(.Items[.@i+1]) || !countitem(.Items[.@i+2])) { mes "You don't have the required materials."; close; } if (.Ticket && .Items[.@i] < 100) if (countitem(.Ticket)) { mes "^FF00001 "+getitemname(.Ticket)+" will be consumed.^000000"; set .@NoFail,1; } if (!.@NoFail && .Items[.@i] < 100) { if (.DispChance) mes "^FF0000There is a "+(100-.Items[.@i])+"% chance of failure.^000000"; else mes "^FF0000The process may fail.^000000"; } mes "Do you wish to proceed?"; next; if(select("Continue:^777777Cancel^000000")==2) close; mes "[Fusion Master]"; delitem .Items[.@i+1],1; delitem .Items[.@i+2],1; if (.@NoFail) delitem .Ticket,1; if (.Price) set Zeny, Zeny-.Price; if(rand(1,100) > .Items[.@i] && !.@NoFail) { specialeffect2 155; mes "Oh, no..."; close; } mes "Success!"; mes "Here's your new item!"; getitem2 .Items[.@i+1],1,1,0,0,0,0,0,.Items[.@i+2]; if (.Announce) announce strcharinfo(0)+" has successfully fused "+getitemname(.Items[.@i+1])+" with "+getitemname(.Items[.@i+2])+"!",0; specialeffect2 91; case 3: close; } OnInit: // Format: <% success>,<Item A>,<Item B>{,...}; // Item B will be slotted inside of Item A; maximum 42 fusion items. setarray .Items[0],50,1202,1228,75,5025,2254,10,1102,1141; set .Price,0; // Zeny cost per fusion attempt, if any set .Ticket,7227; // Item ID consumed for 100% success rate (0 to disable) set .Announce,1; // Announce successful fusion? (1:yes / 0:no) set .DispChance,1; // Show the success rate? (1:yes / 0:no) end; }
-
Frequent gravity handler errors when teleporting...
Euphy replied to Peopleperson49's question in Client-side Support
I've had an issue with this before, and I think it was just a problem with my particular client. Try a different client date first, and see if you still have the problem. Also, I very vaguely remember the "Shared Palettes" hex having to do with it, but it's just an idea - I honestly can't remember if it worked or not. -
setarray .@Questions$[1], "First question!", "Second question!", // etc. "Last question"; setarray .@Answers$[1], "First answer!", "Second answer!", // etc. "Last answer"; set .@correct,0; for(set .@i,1; .@i<=10; set .@i,.@i+1) { mes "[Question "+.@i+"]"; mes .@Questions$[.@i]; input .@input$; if (.@input$ == .@Answers$[.@i]) set .@correct, .@correct+1; // Use the line below instead if case (capitals/non-capitals) does not matter // if (compare(.@input$,.@Answers$[.@i])) set .@correct, .@correct+1; next; } mes "[score]"; mes "^FF0000"+.@correct+"^000000 correct of 10 total."; if (.@correct > YOUR_NUMBER) { // your script } close;
-
Question: How can I edit the skill scripts?
Euphy replied to Orgasmator's question in Database Support
I've never tried it myself, but you can try reading statuses with getstatus: *getstatus <effect type>{,<type>}; Retrieve information about a specific status effect when called. Depending on <type> specified the function will return different information. Possible <type> values: - 0 or undefined: whether the status is active - 1: the val1 of the status - 2: the val2 of the status - 3: the val3 of the status - 4: the val4 of the status - 5: the amount of time in milliseconds that the status has remaining If <type> is not defined or is set to 0, then the script function will either return 1 if the status is active, or 0 if the status is not active. If the status is not active when any of the <type> fields are provided, this script function will always return 0. As for linking, you could have your item call a function that casts a link based on class. -
Question: How can I edit the skill scripts?
Euphy replied to Orgasmator's question in Database Support
It's best to just do it in source. Add to src\map\battle.c (line 2546): case AC_DOUBLE: if(sc && sc->data[sC_SPIRIT] && sc->data[sC_SPIRIT]->val2 == SL_ROGUE) ATK_ADDRATE(150); break; -
@critica: All effects of items in slots are carried over, and the scripts of each item are read just like those of a card. There may be a few attributes that don't work, but everything is fine for the most part.
-
All constants are defined in db\const.txt: EQI_HEAD_TOP 1 EQI_ARMOR 2 EQI_HAND_L 3 EQI_HAND_R 4 EQI_GARMENT 5 EQI_SHOES 6 EQI_ACC_L 7 EQI_ACC_R 8 EQI_HEAD_MID 9 EQI_HEAD_LOW 10 And "getiteminfo" takes multiple "types" as a second argument, with 11 being look:
-
Post above is edited.
-
In the simplest form, you could write something like this: set .@code$,""; for(set .@i,0; .@i<5; set .@i,.@i+1) // Increase "5" for more digits set .@code$, .@code$+rand(10); mes "Code: "+.@code$; input .@input; if (.@input != atoi(.@code$)) close; // script resumes Of course, people have gone way above and beyond with ASCII images and such, but that requires a lot more work~
-
prontera,163,167,4 script Fusion Master 808,{ mes "[Fusion Master]"; mes "After ten long years of searching,"; mes "I've finally come across a way to"; mes "make equipment stronger than"; mes "anyone would've thought..."; next; switch(select("Keep listening...:Fuse items:^777777Cancel^000000")) { case 1: mes "[Fusion Master]"; mes "The process is called ^0055FFFusion^000000."; mes "With it, I can combine two pieces"; mes "of equipment, doubling its"; mes "strength. Of course, there is a"; mes "chance I might fail... ^FF0000and"; mes "your equipment will break.^000000"; next; case 2: mes "[Fusion Master]"; if (Zeny < .Price) { mes "It costs "+.Price+"z to fuse items. Come back later."; close; } mes "What would you like to fuse?"; if (.Price) mes "Each attempt will cost "+.Price+"z."; next; set .@menu$,""; for(set .@i,0; .@i<getarraysize(.Items); set .@i,.@i+3) set .@menu$, .@menu$+((countitem(.Items[.@i+1])?"^0055FF":"^FF0000"))+getitemname(.Items[.@i+1])+"^000000 & "+((countitem(.Items[.@i+2])?"^0055FF":"^FF0000"))+getitemname(.Items[.@i+2])+":"; set .@i, (select(.@menu$)-1)*3; mes "[Fusion Master]"; mes "^0055FF"+getitemname(.Items[.@i+2])+"^000000 ~~> ^0055FF"+getitemname(.Items[.@i+1])+"^000000"; mes " "; if (!countitem(.Items[.@i+1]) || !countitem(.Items[.@i+2])) { mes "You don't have the required materials."; close; } if (.Ticket && .Items[.@i] < 100) if (countitem(.Ticket)) { mes "^FF00001 "+getitemname(.Ticket)+" will be consumed.^000000"; set .@NoFail,1; } if (!.@NoFail && .Items[.@i] < 100) { if (.DispChance) mes "^FF0000There is a "+(100-.Items[.@i])+"% chance of failure.^000000"; else mes "^FF0000The process may fail.^000000"; } mes "Do you wish to proceed?"; next; if(select("Continue:^777777Cancel^000000")==2) close; mes "[Fusion Master]"; delitem .Items[.@i+1],1; delitem .Items[.@i+2],1; if (.@NoFail) delitem .Ticket,1; if (.Price) set Zeny, Zeny-.Price; if(rand(1,100) > .Items[.@i] && !.@NoFail) { specialeffect2 155; mes "Oh, no..."; close; } mes "Success!"; mes "Here's your new item!"; getitem2 .Items[.@i+1],1,1,0,0,0,0,0,.Items[.@i+2]; if (.Announce) announce strcharinfo(0)+" has successfully fused "+getitemname(.Items[.@i+1])+" with "+getitemname(.Items[.@i+2])+"!",0; specialeffect2 91; case 3: close; } OnInit: // Format: <% success>,<Item A>,<Item B>{,...}; // Item B will be slotted inside of Item A; maximum 42 fusion items. setarray .Items[0],50,1202,1228,75,5025,2254,10,1102,1141; set .Price,0; // Zeny cost per fusion attempt, if any set .Ticket,7227; // Item ID consumed for 100% success rate (0 to disable) set .Announce,1; // Announce successful fusion? (1:yes / 0:no) set .DispChance,1; // Show the success rate? (1:yes / 0:no) end; }
-
There's a Wiki article on it! http://rathena.org/wiki/Subversion
-
Either switch(select()) or input+conditional - you'll need to be more specific than that.