Im trying to get this to work. When you get killed you will lose all the gold points you have.
prontera,164,146,3 script Gold Room Assistant#goldroom 4_F_KAFRA1,{
doevent "gold_room_main::OnTalk";
OnInit:
delwaitingroom;
waitingroom " Gold Room",0;
end;
}
// warp portal back prontera
ordeal_3-2,123,123,0 warp gold_room_back_prt 1,1,prontera,155,181
// peco peco summon
ordeal_3-2,0,0,0,0 monster Peco Gold 1369,600,0,0,"gold_room_main::OnKill"
- script gold_room_main -1,{
OnInit:
// gold room map
.map$ = "ordeal_3-2";
// entrance fee
.zeny_cost = 250000;
// rate to get gold
.rate = 50;
// gold random amount
setarray .gold_amount,1,3;
setmapflag .Map$,mf_nogo;
setmapflag .map$,mf_nobranch;
setmapflag .map$,mf_nosave;
setmapflag .map$,mf_nomemo;
setmapflag .map$,mf_noreturn;
setmapflag .map$,mf_nowarp;
setmapflag .map$,mf_nowarpto;
setmapflag .map$,mf_noskill;
setmapflag .Map$,mf_noloot;
end;
OnTalk:
mes "Wasup, Low Class People! I know you want to become rich!";
mes "Well i have a place where you can find a very rare Birds.";
next;
mes "And if you kill those birthds you will gain a random amount of GOLD";
mes "Points or GP and you can ^FF0000TRADE^000000 it into real GOLD!";
next;
mes "But there is something you should know...";
mes "There are guardians that lurking around the map and they are strong!!!";
next;
mes "^FF0000All of your points will lose when you die!^000000 ";
next;
mes "I need";
if ( .zeny_cost )
mes F_InsertComma( .zeny_cost ) + " Zeny";
switch ( select(
"Enter Gold Room",
"Exchange Gold Point",
"Cancel"
)) {
case 1:
if ( Zeny < .zeny_cost ) {
mes "Not enough Zeny.";
}
else {
Zeny -= .zeny_cost;
warp .map$,153,153;
}
break;
case 2:
mes "You got "+F_InsertComma( #GOLDPOINTS )+" Points";
input .@value,0,#GOLDPOINTS;
if ( checkweight( 969, .@value ) ) {
#GOLDPOINTS -= .@value;
getitem 969,.@value;
mes "Gained "+.@value+" Gold.";
}
else {
mes "You overweight.";
}
default:
break;
}
close;
OnKill:
if ( .rate < rand( 100 ) ) {
.@point = rand( .gold_amount[0],.gold_amount[1] );
#GOLDPOINTS += .@point;
dispbottom "Gained "+.@point+" Point. You got "+F_InsertComma( #GOLDPOINTS )+" Points now.";
}
end;
OnPCDieEvent:
.@killerrid = killerrid;
if ( strcharinfo(3) == .map$ && .@killerrid != getcharid(3) && getmonsterinfo( .@killerrid,MOB_NAME ) != "null" ) {
#GOLDPOINTS = 0;
dispbottom "You died, you lost all the point.";
}
end;
}
Question
Mythryx
Im trying to get this to work. When you get killed you will lose all the gold points you have.
prontera,164,146,3 script Gold Room Assistant#goldroom 4_F_KAFRA1,{ doevent "gold_room_main::OnTalk"; OnInit: delwaitingroom; waitingroom " Gold Room",0; end; } // warp portal back prontera ordeal_3-2,123,123,0 warp gold_room_back_prt 1,1,prontera,155,181 // peco peco summon ordeal_3-2,0,0,0,0 monster Peco Gold 1369,600,0,0,"gold_room_main::OnKill" - script gold_room_main -1,{ OnInit: // gold room map .map$ = "ordeal_3-2"; // entrance fee .zeny_cost = 250000; // rate to get gold .rate = 50; // gold random amount setarray .gold_amount,1,3; setmapflag .Map$,mf_nogo; setmapflag .map$,mf_nobranch; setmapflag .map$,mf_nosave; setmapflag .map$,mf_nomemo; setmapflag .map$,mf_noreturn; setmapflag .map$,mf_nowarp; setmapflag .map$,mf_nowarpto; setmapflag .map$,mf_noskill; setmapflag .Map$,mf_noloot; end; OnTalk: mes "Wasup, Low Class People! I know you want to become rich!"; mes "Well i have a place where you can find a very rare Birds."; next; mes "And if you kill those birthds you will gain a random amount of GOLD"; mes "Points or GP and you can ^FF0000TRADE^000000 it into real GOLD!"; next; mes "But there is something you should know..."; mes "There are guardians that lurking around the map and they are strong!!!"; next; mes "^FF0000All of your points will lose when you die!^000000 "; next; mes "I need"; if ( .zeny_cost ) mes F_InsertComma( .zeny_cost ) + " Zeny"; switch ( select( "Enter Gold Room", "Exchange Gold Point", "Cancel" )) { case 1: if ( Zeny < .zeny_cost ) { mes "Not enough Zeny."; } else { Zeny -= .zeny_cost; warp .map$,153,153; } break; case 2: mes "You got "+F_InsertComma( #GOLDPOINTS )+" Points"; input .@value,0,#GOLDPOINTS; if ( checkweight( 969, .@value ) ) { #GOLDPOINTS -= .@value; getitem 969,.@value; mes "Gained "+.@value+" Gold."; } else { mes "You overweight."; } default: break; } close; OnKill: if ( .rate < rand( 100 ) ) { .@point = rand( .gold_amount[0],.gold_amount[1] ); #GOLDPOINTS += .@point; dispbottom "Gained "+.@point+" Point. You got "+F_InsertComma( #GOLDPOINTS )+" Points now."; } end; OnPCDieEvent: .@killerrid = killerrid; if ( strcharinfo(3) == .map$ && .@killerrid != getcharid(3) && getmonsterinfo( .@killerrid,MOB_NAME ) != "null" ) { #GOLDPOINTS = 0; dispbottom "You died, you lost all the point."; } end; }
Im not really sure on why its not working.
Abit of help would be much appreciated.
Thanks!
Edited by Emistry4 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.