Created
October 1, 2020 12:54
-
-
Save AnnieRuru/b5177016943db888f8d322f937e97427 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// why rathena still don't have this function ??? | |
function script F_MesItemInfo { | |
.@item = getarg(0); | |
.@itemname$ = getitemname(.@item); | |
if (.@itemname$ != "null") { | |
.@itemslot = getitemslots(.@item); | |
if (.@itemslot) | |
.@itemname$ = sprintf("%s [%d]", .@itemname$, .@itemslot); | |
} | |
else | |
.@itemname$ = "Unknown Item"; | |
if (PACKETVER >= 20150729) | |
return sprintf("<ITEM>%s<INFO>%d</INFO></ITEM>", .@itemname$, .@item); | |
else if (PACKETVER >= 20130130) | |
return sprintf("<ITEMLINK>%s<INFO>%d</INFO></ITEMLINK>", .@itemname$, .@item); | |
else | |
return .@itemname$; | |
} | |
// Rejoice !! this is my F_ITEML made for rathena | |
function script F_ITEML { | |
.@id = getarg(0); | |
.@itemid$ = callsub( S_Base62, .@id ); | |
.@itemtype = getiteminfo( .@id, 2 ); | |
if ( .@itemtype == IT_WEAPON || .@itemtype == IT_ARMOR ) | |
.@show_slot = true; | |
.@equip_loc$ = callsub( S_Base62, getiteminfo( .@id, 5 ), 5 ); | |
.@viewid$ = "&"+ callsub( S_Base62, getiteminfo( .@id, 11 ) ); | |
if ( .@refine = getarg(1,0) ) | |
.@refine$ = "%"+ callsub( S_Base62, .@refine ); | |
.@cards$ = sprintf( "(%s(%s(%s(%s", callsub( S_Base62, getarg(2,0) ), callsub( S_Base62, getarg(3,0) ), callsub( S_Base62, getarg(4,0) ), callsub( S_Base62, getarg(5,0) ) ); | |
if ( getarg(6,0) ) { | |
copyarray .@opt_id, getarg(6), 5; | |
copyarray .@opt_value, getarg(7), 5; | |
copyarray .@opt_param, getarg(8), 5; | |
.@item_option_size = getarraysize(.@opt_id); | |
for ( .@i = 0; .@i < .@item_option_size; ++.@i ) | |
.@item_option$ += sprintf( "*%s+%s,%s", callsub( S_Base62, .@opt_id[.@i] ), callsub( S_Base62, .@opt_param[.@i] ), callsub( S_Base62, .@opt_value[.@i] ) ); | |
} | |
return "<ITEML>"+ .@equip_loc$ + .@show_slot + .@itemid$ + .@viewid$ + .@refine$ + .@cards$ + .@item_option$ +"</ITEML>"; | |
S_Base62: | |
.@num = getarg(0); | |
while ( .@num ) { | |
.@base62_value$ = $@base62$[ .@num % 62 ] + .@base62_value$; | |
.@num /= 62; | |
} | |
.@default_zeroes = getarg(1,2); | |
while ( getstrlen(.@base62_value$) < .@default_zeroes ) | |
.@base62_value$ = insertchar( .@base62_value$, "0", 0 ); | |
return .@base62_value$; | |
} | |
- script ITEML FAKE_NPC,{ | |
OnInit: | |
setarray $@base62$,"0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"; | |
end; | |
} | |
/* | |
prontera,152,185,5 script reset the seal 1_F_MARIA,{ | |
custom_break_the_seal = 0; | |
} | |
*/ | |
prontera,155,185,5 script break the seal 1_F_MARIA,{ | |
if (custom_break_the_seal & (1<<0)) { | |
mes "you've broken the seal."; | |
close; | |
} | |
mes "the guardian of prontera bla bla"; | |
next; | |
mes "welcome back "+ strcharinfo(0); | |
next; | |
mes "the list are :-"; | |
for (.@i = 0; .@i < .item_req_size; .@i += 2) | |
mes (.item_req[.@i +1])+"x "+ F_MesItemInfo(.item_req[.@i]); | |
next; | |
for (.@i = 0; .@i < .item_req_size; .@i += 2) | |
if (countitem(.item_req[.@i]) < .item_req[.@i +1]) | |
++.@c; | |
if (.@c) { | |
mes "you do not completely bring all the ingredients"; | |
next; | |
for (.@i = 0; .@i < .item_req_size; .@i += 2) | |
mes ((countitem(.item_req[.@i]) < .item_req[.@i +1])? "^FF0000" : "^000000")+(.item_req[.@i +1])+"x "+ F_MesItemInfo(.item_req[.@i])+"^000000"; | |
close; | |
} | |
for (.@i = 0; .@i < .item_req_size; .@i += 2) | |
delitem .item_req[.@i], .item_req[.@i +1]; | |
mes "You broken the seal !!"; | |
announce strcharinfo(0) +" has broken the seal for godly items blah blah...", bc_all; | |
custom_break_the_seal |= (1<<0); | |
close; | |
OnInit: | |
setarray .item_req, | |
901, 100, | |
902, 200, | |
903, 300, | |
904, 400, | |
905, 300, | |
906, 200, | |
907, 100; | |
.item_req_size = getarraysize(.item_req); | |
end; | |
} | |
prontera,158,185,5 script brisingamen seal 1_F_MARIA,{ | |
if ((custom_break_the_seal & (1<<0)) == 0) { | |
mes "you do not break the seal yet"; | |
close; | |
} | |
if (custom_break_the_seal & (1<<1)) { | |
mes "you've completed this quest."; | |
close; | |
} | |
mes "the guardian of prontera bla bla"; | |
next; | |
mes "welcome back "+ strcharinfo(0); | |
next; | |
mes "makes you imba"; | |
next; | |
mes "the list are :-"; | |
for (.@i = 0; .@i < .item_req_size; .@i += 2) | |
mes (.item_req[.@i +1])+"x "+ F_MesItemInfo(.item_req[.@i]); | |
next; | |
for (.@i = 0; .@i < .item_req_size; .@i += 2) | |
if (countitem(.item_req[.@i]) < .item_req[.@i +1]) | |
++.@c; | |
if (.@c) { | |
mes "you do not completely bring all the ingredients"; | |
next; | |
for (.@i = 0; .@i < .item_req_size; .@i += 2) | |
mes ((countitem(.item_req[.@i]) < .item_req[.@i +1])? "^FF0000" : "^000000")+(.item_req[.@i +1])+"x "+ F_MesItemInfo(.item_req[.@i])+"^000000"; | |
close; | |
} | |
if (!checkweight(2630,1)) { | |
mes "you are overweight, go store some item to continue"; | |
close; | |
} | |
for (.@i = 0; .@i < .item_req_size; .@i += 2) | |
delitem .item_req[.@i], .item_req[.@i +1]; | |
mes "You've obtain "+ F_MesItemInfo(2630) +"!!"; | |
announce strcharinfo(0) +" has obtain "+ F_ITEML(2630), bc_all; | |
getitembound 2630, 1, Bound_Char; | |
custom_break_the_seal |= (1<<1); | |
close; | |
OnInit: | |
setarray .item_req, | |
911, 100, | |
912, 200, | |
913, 300, | |
914, 400, | |
915, 300, | |
916, 200, | |
917, 100; | |
.item_req_size = getarraysize(.item_req); | |
end; | |
} | |
prontera,161,185,5 script mjolnir seal 1_F_MARIA,{ | |
if ((custom_break_the_seal & (1<<0)) == 0) { | |
mes "you do not break the seal yet"; | |
close; | |
} | |
if (custom_break_the_seal & (1<<2)) { | |
mes "you've completed this quest."; | |
close; | |
} | |
mes "the guardian of prontera bla bla"; | |
next; | |
mes "welcome back "+ strcharinfo(0); | |
next; | |
mes "can pawn enemy easily"; | |
next; | |
mes "the list are :-"; | |
for (.@i = 0; .@i < .item_req_size; .@i += 2) | |
mes (.item_req[.@i +1])+"x "+ F_MesItemInfo(.item_req[.@i]); | |
next; | |
for (.@i = 0; .@i < .item_req_size; .@i += 2) | |
if (countitem(.item_req[.@i]) < .item_req[.@i +1]) | |
++.@c; | |
if (.@c) { | |
mes "you do not completely bring all the ingredients"; | |
next; | |
for (.@i = 0; .@i < .item_req_size; .@i += 2) | |
mes ((countitem(.item_req[.@i]) < .item_req[.@i +1])? "^FF0000" : "^000000")+(.item_req[.@i +1])+"x "+ F_MesItemInfo(.item_req[.@i])+"^000000"; | |
close; | |
} | |
if (!checkweight(1530,1)) { | |
mes "you are overweight, go store some item to continue"; | |
close; | |
} | |
for (.@i = 0; .@i < .item_req_size; .@i += 2) | |
delitem .item_req[.@i], .item_req[.@i +1]; | |
mes "You've obtain "+ F_MesItemInfo(1530) +"!!"; | |
announce strcharinfo(0) +" has obtain "+ F_ITEML(1530), bc_all; | |
getitembound 1530, 1, Bound_Char; | |
custom_break_the_seal |= (1<<2); | |
close; | |
OnInit: | |
setarray .item_req, | |
921, 100, | |
922, 200, | |
923, 300, | |
924, 400, | |
925, 300, | |
926, 200, | |
927, 100; | |
.item_req_size = getarraysize(.item_req); | |
end; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment