-
Posts
1,238 -
Joined
-
Last visited
-
Days Won
28
Content Type
Profiles
Forums
Downloads
Jobs Available
Server Database
Third-Party Services
Top Guides
Store
Crowdfunding
Everything posted by Skorm
-
how to put more id numbers and random chances of winning
Skorm replied to Jb Roxas's question in Script Requests
100/20=5 so 5 is 20% -
Although this is really helpful. It doesn't have the main thing I'm looking for here which is, Amber Dragon's Palettes 304-530 and the 20 hair palettes. They all have his original 78-303 are black people in Ragnarok Online to much to ask for?
-
Mainly looking for the black skinned ones... Does anyone have this? Here are some images.
-
how to put more id numbers and random chances of winning
Skorm replied to Jb Roxas's question in Script Requests
@jb Roxas I've already made a script that does all of that, are you blind? prontera.gat,155,185,5 script Event Random 757,{ setarray [email protected][0],20,5738,20,5443,25,2294,33,5509,50,5150,100,5426; setarray [email protected]_announce[0],5738,5150; set [email protected]_required,1201; mes "Do you want to use your "+getitemname( [email protected]_required )+" to try and get something awesome?"; next; if( select("- Yes:- No")-1 ) close; if( !countitem( [email protected]_required ) ){ mes "You don't have any "+getitemname( [email protected]_required )+"."; mes "Please come back soon, if you have already them"; } else { delitem [email protected]_required,1; for(set [email protected],0; [email protected] < getarraysize([email protected]); set [email protected],[email protected]+2){ if(rand([email protected][[email protected]])==1){ getitem ([email protected][[email protected]+1]),1; mes "Congratulations!"; for(set [email protected],0; [email protected] < getarraysize([email protected]); set [email protected],[email protected]+1){ if([email protected][[email protected]+1][email protected]_announce[[email protected]]) { announce "[Event Random]: Player " + strcharinfo(0) +", has obtain "+ (([email protected][[email protected]]>=50)?"Low":"High") +" "+getitemname( [email protected][[email protected]+1] )+" with ["+ (100/[email protected][[email protected]]) +"%] Chance.",bc_all,0xBA55D3; } } specialeffect 154; close; } } specialeffect 155; mes "lt's failed, sorry."; } close; } Will broadcast any item that is in the array. setarray [email protected]_announce[0],5738,5150; -
how to put more id numbers and random chances of winning
Skorm replied to Jb Roxas's question in Script Requests
http://mysticpaste.com/private/sY9NTAipgr/ prontera.gat,155,185,5 script Event Random 757,{ setarray [email protected][0],20,5738,20,5443,25,2294,33,5509,50,5150,100,5426; setarray [email protected]_announce[0],5738,5150; set [email protected]_required,1201; mes "Do you want to use your "+getitemname( [email protected]_required )+" to try and get something awesome?"; next; if( select("- Yes:- No")-1 ) close; if( !countitem( [email protected]_required ) ){ mes "You don't have any "+getitemname( [email protected]_required )+"."; mes "Please come back soon, if you have already them"; } else { delitem [email protected]_required,1; for(set [email protected],0; [email protected] < getarraysize([email protected]); set [email protected],[email protected]+2){ if(rand([email protected][[email protected]])==1){ getitem ([email protected][[email protected]+1]),1; mes "Congratulations!"; for(set [email protected],0; [email protected] < getarraysize([email protected]); set [email protected],[email protected]+1){ if([email protected][[email protected]+1][email protected]_announce[[email protected]]) { announce "[Event Random]: Player " + strcharinfo(0) +", has obtain "+ (([email protected][[email protected]]>=50)?"Low":"High") +" "+getitemname( [email protected][[email protected]+1] )+" with ["+ (100/[email protected][[email protected]]) +"%] Chance.",bc_all,0xBA55D3; } } specialeffect 154; close; } } specialeffect 155; mes "lt's failed, sorry."; } close; } -
how to put more id numbers and random chances of winning
Skorm replied to Jb Roxas's question in Script Requests
http://mysticpaste.c...ate/nvt5Eq5cJ5/ Tested works really well, actually. splendide,210,199,5 script Sample 757,{ setarray [email protected][0],20,5738,20,5443,25,2294,33,5509,50,5150,100,5426; set [email protected],20078; mes "Do you want to use your "+getitemname( [email protected] )+" to try and get something awesome?"; next; if( select("Yes:No")-1 ) close; if( !countitem( [email protected] ) ){ mes "You don't have any "+getitemname( [email protected] )+"."; } else { delitem [email protected],1; for(set [email protected],0; [email protected] < getarraysize([email protected]); set [email protected],[email protected]+2){ if(rand([email protected][[email protected]])==1){ getitem ([email protected][[email protected]+1]),1; emotion e_grat; mes "Done, congratz."; close; } } specialeffect2 611; mes "It failed, sorry."; } close; } } To add more items. Simply put there probability out of 100 then there itemid in the [email protected] array. Example: Edit: Sorry Emistry I didn't realize you had replied. Edit-Edit: Because 5%+5%+4%+3%+2%+1%+20%=40%? Doesn't add up to 100% (LOL) there is a 60% gap so the losing percent is actually something like 50% because of the gained percentage of having multiple chances to win. -
I also made a version of this script. Which has a little more substance like a time limit to stop characters from bypassing it, and supports multiple passwords as well it mutes the player and hides them to prevent any and all commands. http://pastebin.com/HQCVnu4B //by skorm Ver1.1 - script GMPROTECT -1,{ OnPCLoginEvent: setarray [email protected]$[1], "Level10+password", "Level20+password", "Level30+password", "Level40+password", "Level50+password", "Level60+password", "Level70+password", "Level80+password", "Level90+password"; for( set [email protected],10; [email protected] < (getarraysize([email protected]$)*10); set [email protected],[email protected] + 10){ if(getgmlevel()>[email protected]){ set [email protected],([email protected] / 10);} } if(getgmlevel() >= 10 && getgmlevel() <= 99) { initnpctimer; if($player$[0]!=""){ for(set [email protected],0; [email protected] < getarraysize($player$); set [email protected],[email protected] + 1) { set [email protected],[email protected] + 1; setarray $player$[[email protected]],$player$[[email protected]]; setarray $playerinfo$[[email protected]],$playerinfo$[[email protected]]; } } setarray $player$[0],strcharinfo(0); setarray $playerinfo$[0],getcharid(3); atcommand "@hide"; atcommand "@mute 100 "+strcharinfo(0); mes "Please input your password, before 60 seconds are up."; input(@input$); if(@input$ == [email protected]$[[email protected]]) { mes "Welcome to our Server."; close2; stopnpctimer; for( set [email protected],0; [email protected] < getarraysize($player$); set [email protected],[email protected] + 1){ attachrid($playerinfo$[[email protected]]); if(playerattached()){ if($player$[[email protected]]==strcharinfo(0)) { set [email protected],1; callfunc "unlocker",$player$[[email protected]],$playerinfo$[[email protected]],[email protected]; } } } } else { mes "Incorrect!"; close2; for( set [email protected],0; [email protected] < getarraysize($player$); set [email protected],[email protected] + 1){ attachrid($playerinfo$[[email protected]]); if(playerattached()){ if($player$[[email protected]]==strcharinfo(0)) { callfunc "unlocker",$player$[[email protected]],$playerinfo$[[email protected]],[email protected]; } } } } } end; OnTimer60000: for( set $a,0; $a < getarraysize($player$); set $a,$a + 1){ attachrid($playerinfo$[$a]); if(playerattached()){ if($player$[$a]==strcharinfo(0)) { callfunc "unlocker",$player$[$a],$playerinfo$[$a],[email protected]; } } } end; OnInterIfInit: setarray $player$[0],"","","","","",""; setarray $playerinfo$[0],"","","","","",""; end; } function script unlocker { detachrid; if(getarg(2)){ atcommand "@unmute "+getarg(0); attachrid(getarg(1)); atcommand "@hide"; close; } else atcommand "@unmute "+getarg(0); attachrid(getarg(1)); atcommand "@kick "+strcharinfo(0); }
-
prontera,155,181,5 script Sample 757,{ if( thirdJobItems ){ mes "You have gained the Item before."; } else { switch( BaseJob ){ Case Job_Knight: set .ItemID,7539; break; Case Job_Priest: set .ItemID,7539; break; Case Job_Wizard: set .ItemID,7539; break; Case Job_Blacksmith: set .ItemID,7539; break; Case Job_Hunter: set .ItemID,7539; break; Case Job_Assassin: set .ItemID,7539; break; Case Job_Crusader: set .ItemID,7539; break; Case Job_Monk: set .ItemID,7539; break; Case Job_Sage: set .ItemID,7539; break; Case Job_Rogue: set .ItemID,7539; break; Case Job_Alchemist: set .ItemID,7539; break; Case Job_Bard: set .ItemID,7539; break; Case Job_Dancer: set .ItemID,7539; break; default: mes "Nothing you can take.."; close; } getitem .ItemID,1; mes "You have gained 1 "+getitemname( .ItemID )+"."; set thirdJobItems,1; } close; } Can't use numbers at the start of a variable.
-
prontera,111,111,5 script Repairer 123,{ atcommand "@repairall " + strcharinfo(0); end; } prontera,111,111,5 script Repairer#2 123,{ while(getbrokenid(0)){ repair getbrokenid(0); } end; } Number one will show up in logs number two won't.