

utofaery
-
Posts
228 -
Joined
-
Last visited
-
Days Won
3
Community Answers
-
utofaery's post in Donation NPC Request was marked as the answer
1. Rathena forum do make use of search function and question is did you know it's located at top right of the forum page ???
2. Search first before you even do the asking.
3. you request might go unanswered if it's already answer. or it's everywhere already.
-
utofaery's post in NPC ITEMSHOP CUSTOM was marked as the answer
A few things you will need:
-%TAB%itemshop%TAB%<NPC Name>%TAB%<sprite id>,<costitemid>{:<discount>},<itemid>:<price>{,<itemid>:<price>...}
*callshop "<name>",<option>;
check >> Rathena/doc/script_commands.txt for explaination
-
utofaery's post in Chance items Box was marked as the answer
This method is easier comparing to recompiling lolz. comparing to editing database .txt all around
and this method is fully changable to event script's need easily..(on the fly changes)
Sorry for the broken previous script but this script tested working in current rathena version.
Put this part inside your npc files.
function script F_RBox { // change Item ID here setarray @i1[0],607,608; // Common Items setarray @i2[0],512,513; // Rare Items setarray @i3[0],514,515; // Super Rare Items set @i1rand,rand( getarraysize(@i1) ); // Randomize Common Items; just change max amount if you add items set @i2rand,rand( getarraysize(@i2) ); // Randomize Rare Items; just change max amount if you add items set @i3rand,rand( getarraysize(@i3) ); //Randomize Super Rare Items; just change max amount if you add items .chance = rand(100); // Super Rare Item 1% if (.chance == 1) { getitem @i[@i3rand],1; announce "["+strcharinfo(0)+"] won a ["+getitemname(@i3[@i3rand])+"] from the Super Rare Box.",0; end; } // Rare Item 10% else if (.chance <= 11 && .chance >= 1){ getitem @i[@i2rand],1; announce "["+strcharinfo(0)+"] won a ["+getitemname(@i2[@i2rand])+"] from the Rare Item Box.",0; end; } // Common Items else { getitem @i1[@i1rand],1; end; } } Note : above script is to be inside any .txt which are loaded in your npc folder
https://www.google.com/search?q=rathena+adding+npc+script&oq=rathena+adding+npc+script&aqs=chrome..69i57j69i60l3.4790j0j1&sourceid=chrome&ie=UTF-8
Put this line in you Item Script.
callfunc("F_RBox");
https://github.com/rathena/rathena/wiki/Adding-a-Script
example:
617,Old_Violet_Box,Old Purple Box,2,10000,,200,,,,,0xFFFFFFFF,63,2,,,,,,{ callfunc ( "F_RBox" ) ; },{},{}
https://github.com/rathena/rathena/wiki/Custom-Items
-
utofaery's post in Consumables in favorites was marked as the answer
SQL table + source...
take a loot at item hotkey ...
it's save in sql table and read from ...(i dont know what reads from it thou)
may be you can find something there...
-
utofaery's post in I need a random item generator can anyone help me? was marked as the answer
prontera,141,226,4 script Maquina de Promoções 2_DROP_MACHINE,{ //debugonly dispbottom ( "debug :: .len_i " + .len_i + ".itm_a " + .itm_a + ".itm_p " + .itm_p + " ." ) ; mes .npc_n$; mes "It only cost " + .itm_a + " " + getitemname(.itm_p) + "to use this machine!"; mes "Would you like to use it?"; next; if(select("^0084ff[ • ]^000000 Yes:^CD3278[ • ]^000000 No:^0084ff[ • ]^000000 What can I earn??")&2) { if(@menu-2) { .@mes$ = "You can get: "; for( .@a = 1; .@a <=.len_i; .@a++ ) { .@itm$ = getitemname(.itm_l[(.@a-1)]); if(.@a%10&&.@a<=.len_i&&.@a!=.len_i) { .@mes$ = .@mes$+((!((.@a%10)-9)&&.@a<=.len_i)?"and "+.@itm$+".":.@itm$+", "); } else { mes .npc_n$; if(.@a<.len_i) { mes .@mes$; .@mes$ = "You can also get : "+.@itm$+", "; next; if(select("Continue:Cancel")&2) close; } else { mes .@mes$+"and "+.@itm$+"."; close; } } } } else close; } if (countitem(.itm_p) < .itm_a) { mes .npc_n$; mes "You do not have "+.itm_a+" "+getitemname(.itm_p); close; } .@rand = rand(.totalchance); .@i = 0; while ( ( .@rand -= .it_rates[.@i] ) >= 0 ) .@i++; mes .npc_n$; mes "Here it is!"; delitem .itm_p,.itm_a; getitem .itm_l[.@i], 1; .@gitem$ = getitemname(.itm_l[.@i]); // dispbottom ("debug :: .@gitem$ " + .@gitem$ + " .itm_l[.@i]" + .itm_l[.@i] ); announce strnpcinfo(0)+": "+strcharinfo(0)+" won ["+.@gitem$+"] da Máquina de Promoções!",bc_all|bc_yellow; //debugonly dispbottom ( " debug :: .it_rates " + .it_rates + " .totalchance :: " + .totalchance + " .@rand :: " + .@rand) ; close; OnInit: .npc_n$ = "[^ 4B0082 Promotion Kit ^ 000000]"; // NPC Name. setarray .itm_l , 502, 678, 607 ,608 ,2101 ,1505 ,609;// Item List setarray .it_rates, 15, 16, 17, 18, 19, 20, 21; // ?item?rates? .len_i = getarraysize(.itm_l); //item id array size .itm_a = 1; //per draw Item cost .itm_p = 512; //per draw item ID .@i = 0; while ( .itm_l[.@i] ) { .totalchance += .it_rates[.@i]; .@i++; } } /*choosing rates... prontera,157,180,5 script test item_reward#3 100,{ .@rand = rand(.totalchance); .@i = 0; while ( ( .@rand -= .itemchance[.@i] ) >= 0 ) .@i++; getitem .itemid[.@i], 1; end; OnInit: setarray .itemid, 501,502,503,504,505,506,507,508,509; setarray .itemchance, 10,10,10,10,3,10,10,10,10; .@i = 0; while ( .itemid[.@i] ) { .totalchance += .itemchance[.@i]; .@i++; } end; } */ Tidy up Updated per request.
-
utofaery's post in monster belzebu id: 1874 is knocking down my game was marked as the answer
custom skill? casted by this "1872"?
1. Try disguise 1872 or 1874 again to confirm it's not sprite related.
2. open mob_skill_db or any monster skill db
when in there open your server and run your client
inside your client
use @skill SKILLID
where SKILLID is all the skill of that 1872 and 1874 monster
if you don't understand this procedure ask someone to explain to you, because I can't explain in other way than this.
3. If it is custom skill you need to fix that yourself unless you post what your code or changes for your custom skill here to let people inspect on it.
-
utofaery's post in Hat with bad effect (unexpected eof @ string ) bacsojin hat was marked as the answer
Remove this!
and disregard
-
utofaery's post in Help with this little script was marked as the answer
dispbottom instead of dispbotton???
Update: Should be good.
-
utofaery's post in Please Help, Duplicating sprite was marked as the answer
Change the item's Aegis name
Eg:
Item 1:
xxxx,SuperduperCustom1,ItemNameCustom1,....
Item 2:
xxxx,SuperduperCustom2,ItemNameCustom2,....
Item 3:
xxxx,SuperduperCustom3,ItemNameCustom3,....