PandaLovesHamster Posted March 31, 2015 Group: Members Topic Count: 51 Topics Per Day: 0.01 Content Count: 452 Reputation: 35 Joined: 12/18/14 Last Seen: May 30, 2016 Share Posted March 31, 2015 Hi, I tried to make my own script for this NPC and failed miserably. I'd like to ask for a little help on this part.What I need is an NPC that will ask players 100 Gold and 10m zeny to create one random castle drop. It will have at least 40% success rate. Progressbar would be really appreciated and with accompanying upgrading/forging sound. Thank you in advance Quote Link to comment Share on other sites More sharing options...
PandaLovesHamster Posted April 2, 2015 Group: Members Topic Count: 51 Topics Per Day: 0.01 Content Count: 452 Reputation: 35 Joined: 12/18/14 Last Seen: May 30, 2016 Author Share Posted April 2, 2015 Bump. I really need this, sorry. Quote Link to comment Share on other sites More sharing options...
Skorm Posted April 2, 2015 Group: Forum Moderator Topic Count: 33 Topics Per Day: 0.01 Content Count: 1282 Reputation: 393 Joined: 02/03/12 Last Seen: April 11 Share Posted April 2, 2015 Maybe this will help you out enough with your script. prontera,100,100,1 script chance_get 101,{ mes "[ Chancy ]"; mes "Oh hello would you like to try my game?"; next; if( select( "Yes:No" ) == 2 ) { mes "[ Chancy ]"; mes "I'm sorry to hear that. Maybe next time then."; close; } mes "[ Chancy ]"; if( countitem( .gold ) < .gold_amount ) { mes "You don't have enough "+getitemname( .gold )+"."; mes "I require at least "+.gold_amount+"."; close; } else if( Zeny < .zeny ) { mes "It looks like you don't have enough zeny..."; mes "You need at least "+.zeny+"."; close; } Zeny = Zeny - .zeny; delitem .gold, .gold_amount; if( rand( 101 ) <= .chance ) { .@rand = rand( .length ); getitem .rewards[.@rand], .reward_amounts[.@rand]; mes "Congratulations you got "+getitemname( .rewards[.@rand] )+" x"+.reward_amounts[.@rand]+"!!!"; } else mes "I'm sorry you didn't get anything. Come back and try again!"; close; OnInit: .gold = 617; .gold_amount = 100; .zeny = 10000000; .chance = 40; setarray .rewards, 501, 502, 503, 504, 506; setarray .reward_amounts, 1, 1, 1, 2, 2; .length = getarraysize( .rewards ); } 1 Quote Link to comment Share on other sites More sharing options...
PandaLovesHamster Posted April 4, 2015 Group: Members Topic Count: 51 Topics Per Day: 0.01 Content Count: 452 Reputation: 35 Joined: 12/18/14 Last Seen: May 30, 2016 Author Share Posted April 4, 2015 Thank you sir Skorm. I'll test it right away. But reading through it, I think it's gonna work. Thank you so much. Quote Link to comment Share on other sites More sharing options...
Question
PandaLovesHamster
Hi, I tried to make my own script for this NPC and failed miserably. I'd like to ask for a little help on this part.
What I need is an NPC that will ask players 100 Gold and 10m zeny to create one random castle drop. It will have at least 40% success rate.
Progressbar would be really appreciated and with accompanying upgrading/forging sound.
Thank you in advance
Link to comment
Share on other sites
3 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.