Eros Posted January 25, 2014 Posted January 25, 2014 Does anyone know how to make a script that auto restock potion once you click the healer for example you set it to 500 Cold Medicine 10 Halo Halo.Everytime you talk to the healer, The healer will automatically restock your cold medicine and halo halo to 10 pcs.Thanks. Quote
AnnieRuru Posted January 25, 2014 Posted January 25, 2014 prontera,159,184,5 script kjhfksjdfhs 100,{ percentheal 100,100; if ( countitem( "Cold_Medicine" ) < 500 ) { .@count = 500 - countitem( "Cold_Medicine" ); if ( checkweight( "Cold_Medicine", .@count ) ) getitem "Cold_Medicine", .@count; } if ( countitem( "Halohalo" ) < 10 ) { .@count = 10 - countitem( "Halohalo" ); if ( checkweight( "Halohalo", .@count ) ) getitem "Halohalo", .@count; } end; }500 cold medicines is quite heavy ... Quote
Eros Posted January 26, 2014 Author Posted January 26, 2014 Miss sexy beautiful annie do you have a NPC that you can set a ammount of item that you want to get 1 Quote
Capuche Posted January 26, 2014 Posted January 26, 2014 prontera,159,184,5 script kjhfksjdfhs 100,{ percentheal 100,100; if ( countitem( "Cold_Medicine" ) < @cold_medecine ) { .@count = @cold_medecine - countitem( "Cold_Medicine" ); if ( checkweight( "Cold_Medicine", .@count ) ) getitem "Cold_Medicine", .@count; } if ( countitem( "Halohalo" ) < @haloh ) { .@count = @haloh - countitem( "Halohalo" ); if ( checkweight( "Halohalo", .@count ) ) getitem "Halohalo", .@count; } end; OnWhisperGlobal: mes "how many cold medecine?"; input @cold_medecine, 0,500; mes "how many halo"; input @haloh, 0,10; close; } whisper the npc to set the amount Quote
AnnieRuru Posted January 27, 2014 Posted January 27, 2014 (edited) I rather change the healing into OnTouch, and the setting into normal npc message I'm having fun complicating this script [paste=5dtzwyernzn1] somehow it seems like .. if ( sscanf( potion_restock$, "%d#%d", .@a, .@b ) < 2 ) doesn't work if the potion_restock$ is an emptry string .. -> reported -> http://rathena.org/board/tracker/issue-8562- Edited January 27, 2014 by AnnieRuru Quote
Eros Posted January 28, 2014 Author Posted January 28, 2014 I mean miss annie everytime you click the healer you'll automatically restock a potion Quote
AnnieRuru Posted January 28, 2014 Posted January 28, 2014 then how do you want to make the settings so the players can adjust the number of potions they want to bring ? or do you mean only the GM can set, players can only click on it ? yeah ... making this more complicated [paste=6iuyh744gw92] Quote
Eros Posted January 28, 2014 Author Posted January 28, 2014 What i mean is everytime you click it will restock and i'll be the one who will set the potions. players can only click it Quote
AnnieRuru Posted January 28, 2014 Posted January 28, 2014 that's no fun at all ... prontera,159,184,5 script kjhfksjdfhs 100,{ if ( ( .@count = .cold_medicine - countitem( "Cold_Medicine" ) ) > 0 ) { if ( checkweight( "Cold_Medicine", .@count ) ) getitem "Cold_Medicine", .@count; else dispbottom "You can't carry enough Cold Medicine"; } if ( ( .@count = .halohalo - countitem( "Halohalo" ) ) > 0 ) { if ( checkweight( "Halohalo", .@count ) ) getitem "Halohalo", .@count; else dispbottom "You can't carry enough Halohalo"; } end; OnInit: .cold_medicine = 500; .halohalo = 10; } Quote
Question
Eros
Does anyone know how to make a script that auto restock potion once you click the healer for example you set it to 500 Cold Medicine 10 Halo Halo.
Everytime you talk to the healer, The healer will automatically restock your cold medicine and halo halo to 10 pcs.
Thanks.
8 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.