Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- prontera,145,158,1 script Gold Room 100,{
- if (Life == 1) goto L_Life;
- mes "[Gold Room]";
- mes "Hey, Hey! You wonder why I am so Rich?!";
- mes "Well, that because I found this place called the Gold Room";
- mes "OMG! There's 10 Gold Room!";
- mes "The 1x is free";
- mes "But all the other Gold Room you have to pay Gold.";
- mes "2x is 2000 Gold, 3x is 3000 Gold and Soon On...";
- mes "Why you have to pay? Well it drops MORE Times the GOLD!";
- mes "Oh! There's a Lifetime Pass! You need 30k Gold...";
- mes "So, which Gold Room would you like to go too?"; next;
- for(set(.@p, 1);.@p<=.pri_len;set(.@p,.@p+1)) {
- set .@menu$, .@menu$ + ((.@p!=.pri_len )?
- .name$[.@p]+":"
- :
- .name$[.@p]+":"+"Goodbye");
- }
- select(.@menu$);
- set .@price, .price[@menu];
- set .@itmcnt, countitem(.itemid);
- if(@menu==(.pri_len-3)) {
- mes "[Gold Room]";
- mes "You need 30k Gold to have a Lifetime pass.";
- mes "Lifetime Pass let's you go to ALL the Gold Room for Free!";
- mes "Do you have 30k Gold?"; next;
- menu "Yes!",-,"Nope",bye;
- if (.@itmcnt<.@price ){
- mes "[Gold Room]";
- mes "You don't have it!";
- close;
- }
- delitem .itemid,.@price;
- set Life,1;
- mes "[Gold Room]";
- mes "You have a Life Time Pass!";
- close;
- end;
- } else if (@menu<.pri_len ) {
- if (.@itmcnt<.@price ) {
- mes "[Gold Room]";
- mes "Ha! You don't have enough!";
- next;
- close;
- }
- mes "[Gold Room]";
- mes "Have Fun!";
- delitem .itemid,.@price;
- close2;
- warp "pvp_y_"+@menu+"-1",0,0;
- end;
- }
- goto Bye;
- L_Life:
- mes "[Gold Room]";
- mes "You have a Life Time Pass";
- mes "Which Room would you like to go in?"; next;
- for(set(.@p, 1);.@p<=.pri_len;set(.@p,.@p+1)) {
- set .@menu$, .@menu$ + ((.@p!=(.pri_len-3) )?
- .name$[.@p]+":"
- :
- "Goodbye");
- }
- if(select(.@menu$)<.pri_len) {
- mes "[Gold Room]";
- mes "Have Fun!";
- close2;
- warp "pvp_y_"+@menu+"-1",0,0;
- end;
- }
- Bye:
- mes "[Gold Room]";
- mes "Bye";
- close;
- end;
- OnMobKilled:
- getitem .itemid,.amtper;
- //set .@map$, substr(strcharinfo(3), 6, 6);
- set .@map$, callfunc("str_charat", strcharinfo(3), 6);
- monster "pvp_y_"+.@map$+"-1",0,0,"Gold",1614,1,"Gold Room::OnMobKilled";
- end;
- OnInit:
- setarray .price[1], 0, 20, 30, 40, 50, 60, 70, 80, 90, 100, 300;
- setarray .name$[1], "1x", "2x", "3x", "4x", "5x", "6x", "7x", "8x", "Lifetime Pass";
- set .itemid, 969;
- set .pri_len, getarraysize(.price);
- set .amtper, 1;
- for(set(.p, 1);.p<9;set(.p,.p+1)) {
- monster "pvp_y_1-1",0,0,"Gold",1614,2500,"Gold Room::OnMobKilled";
- }
- end;
- }
- /// callfunc "str_charat", "<string>" , <pos> ;
- function script str_charat {
- sleep2 1;
- setarray .@char$[ 0 ],
- " ", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9",
- "e", "i", "a", "s", "r", "n", "t", "o", "u", "l", "c",
- "p", "m", "d", "v", "h", "g", "f", "b", "y", "q", "k",
- "z", "x", "j", "w", "_", "-", ".", ",";
- set .@charsize, getarraysize(.@char$);
- set .@tmp$, "|~key~|";
- set .@str$, .@tmp$ + getarg(0) ;
- set .@len, getstrlen(getarg(0));
- set .@pos, getarg(1);
- if ( .@pos >= .@len ) return "";
- while( .@len>.@s ) {
- set .@i,0;
- while( .@i<.@charsize ) {
- if ( ! ( set(.@l,.@l+1) % 650) )
- sleep2 1;
- if ( compare( .@str$ , .@tmp$ + .@char$[.@i] ) ) {
- set .@tmp$, .@tmp$ + .@char$[.@i];
- if ( .@s == .@pos ) return .@char$[.@i] ;
- else break;
- }
- set .@i, .@i+1;
- }
- if ( .@i == .@charsize ) return 0;
- else set .@s, .@s+1;
- }
- deletearray getd(getarg(1));
- copyarray getd(getarg(1)), .@arr$, .@len;
- return "";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement