Jump to content

n0tttt

Members
  • Posts

    303
  • Joined

  • Days Won

    12

Everything posted by n0tttt

  1. Like this? prontera,100,100,4 Quest Checker 100,{ setarray .@color$[0],"^009900Complete","^990000Incomplete"; // Put here the quest ids. Find them on the scripts or quest_db setarray .@quest_id[0],2157,2094,17017; // Names here. setarray .@quest$[0],"Attitude to the New World","Cursed Spirit","Nameless Island Entrance"; for(.@size = getarraysize(.@quest_id);.@i < .@size;.@i++) { .@status = checkquest(.@quest_id[.@i]) != 2; mes .@quest$[.@i]+" - "+.@color$[.@status]+"^000000"; } close; }
  2. Okay I know how to fix that one. - script Items_Conf -1,{ OnInit: callsub Ids, 60656, 1, 1004, 1, 60657, 1, 1004, 1, 60658, 1, 1004, 0 ; callsub Ids, 60635, 1, 111, 1, 60636, 1, 111, 1, 60637, 1, 111, 0 ; /* ID[...], evolution mode[...], mob id[...], neccessary to get 1%[...]. If you want any monster, use 111. Evolution modes: 1 = Every X numer of mobs (1%). 2 = Experience (1%). */ /* 0 = Won't be evolved automatically. 1 = Will be evolved automatically */ .auto = 1; /* Color of the announces. */ setarray .c$[0], "4db557", // % of evolution. "d43438", // Wings evolving. "4da5b5"; // Wings evolved. /* slots to check. EQI_ACC_L (0) - Accessory 1 EQI_ACC_R (1) - Accessory 2 EQI_SHOES (2) - Footgear (shoes, boots) EQI_GARMENT (3) - Garment (mufflers, hoods, manteaux) EQI_HEAD_LOW (4) - Lower Headgear (beards, some masks) EQI_HEAD_MID (5) - Middle Headgear (masks, glasses) EQI_HEAD_TOP (6) - Upper Headgear EQI_ARMOR (7) - Armor (jackets, robes) EQI_HAND_L (8) - Left hand (weapons, shields) EQI_HAND_R (9) - Right hand (weapons) EQI_COSTUME_HEAD_TOP (10) - Upper Costume Headgear EQI_COSTUME_HEAD_MID (11) - Middle Costume Headgear EQI_COSTUME_HEAD_LOW (12) - Lower Costume Headgear EQI_COSTUME_GARMENT (13) - Costume Garment EQI_AMMO (14) - Arrow/Ammunition EQI_SHADOW_ARMOR (15) - Shadow Armor EQI_SHADOW_WEAPON (16) - Shadow Weapon EQI_SHADOW_SHIELD (17) - Shadow Shield EQI_SHADOW_SHOES (18) - Shadow Shoes EQI_SHADOW_ACC_R (19) - Shadow Accessory 2 EQI_SHADOW_ACC_L (20) - Shadow Accessory 1 */ setarray .slots[0], EQI_HEAD_LOW, EQI_HEAD_MID, EQI_HEAD_TOP; //============================================= end ; Ids: for ( .@args = getargcount ( ); .@a < .@args ; .@a+=4 ) { .@i = .w2[.w1]++; setd ".a1"+ .w1 +"_"+ .@i, getarg ( .@a ); // id. if ( getarg ( .@a + 4, 0 ) != 0 ) { setd ".a2"+ .w1 +"_"+ .@i, getarg ( .@a + 1 ); // mode. setd ".a3"+ .w1 +"_"+ .@i, getarg ( .@a + 2 ); // mob id. setd ".a4"+ .w1 +"_"+ .@i, getarg ( .@a + 3 ); // amount. } } .w1++; return ; OnNPCKillEvent: // Cache. That old loop on every mob killed... if ( @wing[0] && isequipped ( @wing[0] ) ) { .@c = 1; .@e = @wing[0]; .@i = @wing[1]; .@j = @wing[2]; .@a = @wing[3]; } else { .@size = getarraysize ( .slots ) while ( .@a < .@size && !.@c ) { .@e = getequipid ( .slots[.@a] ); if ( .@e < 0 ) continue ; .@i = 0; while ( .@i < .w1 && !.@c ) { .@j = 0; while ( .@j < .w2[.@i] && !.@c ) { if ( .@e == getd ( ".a1"+ .@i +"_"+ .@j ) && getd ( ".a1"+ .@i +"_"+ ( .@j + 1 ) ) ) { if ( getd ( ".a4"+ .@i +"_"+ .@j ) > 0 && ( killedrid == getd ( ".a3"+ .@i +"_"+ .@j ) || getd ( ".a3"+ .@i +"_"+ .@j ) < 1001 ) ) { .@c = 1; setarray @wing[0], .@e, .@i, .@j, .@a; } } if ( !.@c ) .@j++; } if ( !.@c ) .@i++; } if ( !.@c ) .@a++; } } if ( .@c ) { if ( getd ( ".a2"+ .@i +"_"+ .@j ) == 1 ) { .@amount = getd ( "mobs_"+ .@e ); setd "mobs_"+ .@e, .@amount + 1; if ( getd ( "mobs_"+ .@e ) < getd ( ".a4"+ .@i +"_"+ .@j ) ) end ; setd "evo"+ .@e, getd ( "evo"+ .@e ) + 1; setd "mobs_"+ .@e, 0; } else if ( getd ( ".a2"+ .@i +"_"+ .@j ) == 2 ) { .@amount = getd ( "exp_"+ .@e ); setd "exp_"+ .@e, .@amount + strmobinfo ( 6, killedrid ); if ( getd ( "exp_"+ .@e ) < getd ( ".a4"+ .@i +"_"+ .@j ) ) end ; setd "evo"+ .@e, getd ( "evo"+ .@e ) + 1; setd "exp_"+ .@e, 0; } else debugmes "Script Items_Evo, error: wrong mode."; announce getitemname ( .@e ) +" is now "+ getd ( "evo"+ .@e ) +"% from evolving...", bc_self, "0x"+ .c$[0] ; specialeffect2 58 ; sleep2 200 ; specialeffect2 383 ; if ( getd ( "evo"+ .@e ) >= 100 && .auto ) { specialeffect2 263 ; sleep2 500 ; specialeffect2 377 ; sleep2 300 ; specialeffect2 542 ; sleep2 300 ; announce getitemname ( .@e ) +" is evolving..." , bc_self, "0x"+ .c$[1] ; .@i = 3; while ( .@i-- ) { specialeffect2 521 ; sleep2 900 ; } specialeffect2 463 ; sleep2 200; specialeffect2 665 ; sleep2 500 ; setarray .@card[1], getequipcardid ( .slots[.@a], 0 ), getequipcardid ( .slots[.@a], 1 ), getequipcardid ( .slots[.@a], 2 ), getequipcardid ( .slots[.@a], 3 ); .@refine = getequiprefinerycnt ( .slots[.@a] ); //unequip .slots[.@a]; //delitem .@e, 1 ; getitem2 getd ( ".a1"+ .@i +"_"+ ( .@j + 1 ) ) , 1, 1, .@refine, 0, .@card[1], .@card[2], .@card[3], .@card[4] ; equip getd ( ".a1"+ .@i +"_"+ ( .@j + 1 ) ) ; setd "evo"+ .@e, 0; deletearray @wing ; announce "Congratulations, your wings have evolved to "+ getitemname ( getd ( ".a1"+ .@i +"_"+ ( .@j + 1 ) ) ) +"." , bc_self , "0x"+ .c$[2] ; } } end ; }
  3. This is weird. I commented those lines. Tell me what happens. - script Items_Conf -1,{ OnInit: callsub Ids, 60656, 1, 1004, 1, 60657, 1, 1004, 1, 60658, 1, 1004, 0 ; callsub Ids, 60635, 1, 111, 1, 60636, 1, 111, 1, 60637, 1, 111, 0 ; /* ID[...], evolution mode[...], mob id[...], neccessary to get 1%[...]. If you want any monster, use 111. Evolution modes: 1 = Every X numer of mobs (1%). 2 = Experience (1%). */ /* 0 = Won't be evolved automatically. 1 = Will be evolved automatically */ .auto = 1; /* Color of the announces. */ setarray .c$[0], "4db557", // % of evolution. "d43438", // Wings evolving. "4da5b5"; // Wings evolved. /* slots to check. EQI_ACC_L (0) - Accessory 1 EQI_ACC_R (1) - Accessory 2 EQI_SHOES (2) - Footgear (shoes, boots) EQI_GARMENT (3) - Garment (mufflers, hoods, manteaux) EQI_HEAD_LOW (4) - Lower Headgear (beards, some masks) EQI_HEAD_MID (5) - Middle Headgear (masks, glasses) EQI_HEAD_TOP (6) - Upper Headgear EQI_ARMOR (7) - Armor (jackets, robes) EQI_HAND_L (8) - Left hand (weapons, shields) EQI_HAND_R (9) - Right hand (weapons) EQI_COSTUME_HEAD_TOP (10) - Upper Costume Headgear EQI_COSTUME_HEAD_MID (11) - Middle Costume Headgear EQI_COSTUME_HEAD_LOW (12) - Lower Costume Headgear EQI_COSTUME_GARMENT (13) - Costume Garment EQI_AMMO (14) - Arrow/Ammunition EQI_SHADOW_ARMOR (15) - Shadow Armor EQI_SHADOW_WEAPON (16) - Shadow Weapon EQI_SHADOW_SHIELD (17) - Shadow Shield EQI_SHADOW_SHOES (18) - Shadow Shoes EQI_SHADOW_ACC_R (19) - Shadow Accessory 2 EQI_SHADOW_ACC_L (20) - Shadow Accessory 1 */ setarray .slots[0], EQI_HEAD_LOW, EQI_HEAD_MID, EQI_HEAD_TOP; //============================================= end ; Ids: for ( .@args = getargcount ( ); .@a < .@args ; .@a+=4 { .@i = .w2[.w1]++; setd ".a1"+ .w1 +"_"+ .@i, getarg ( .@a ); // id. setd ".a2"+ .w1 +"_"+ .@i, getarg ( .@a + 1 ); // mode. setd ".a3"+ .w1 +"_"+ .@i, getarg ( .@a + 2 ); // mob id. setd ".a4"+ .w1 +"_"+ .@i, getarg ( .@a + 3 ); // amount. } .w1++; return ; OnNPCKillEvent: // Cache. That old loop on every mob killed... if ( @wing[0] && isequipped ( @wing[0] ) ) { .@c = 1; .@e = @wing[0]; .@i = @wing[1]; .@j = @wing[2]; .@a = @wing[3]; } else { .@size = getarraysize ( .slots ) while ( .@a < .@size && !.@c ) { .@e = getequipid ( .slots[.@a] ); if ( .@e < 0 ) continue ; .@i = 0; while ( .@i < .w1 && !.@c ) { .@j = 0; while ( .@j < .w2[.@i] && !.@c ) { if ( .@e == getd ( ".a1"+ .@i +"_"+ .@j ) && getd ( ".a1"+ .@i +"_"+ ( .@j + 1 ) ) ) { if ( getd ( ".a4"+ .@i +"_"+ .@j ) > 0 && ( killedrid == getd ( ".a3"+ .@i +"_"+ .@j ) || getd ( ".a3"+ .@i +"_"+ .@j ) < 1001 ) ) { .@c = 1; setarray @wing[0], .@e, .@i, .@j, .@a; } } if ( !.@c ) .@j++; } if ( !.@c ) .@i++; } if ( !.@c ) .@a++; } } if ( .@c ) { if ( getd ( ".a2"+ .@i +"_"+ .@j ) == 1 ) { .@amount = getd ( "mobs_"+ .@e ); setd "mobs_"+ .@e, .@amount + 1; if ( getd ( "mobs_"+ .@e ) < getd ( ".a4"+ .@i +"_"+ .@j ) ) end ; setd "evo"+ .@e, getd ( "evo"+ .@e ) + 1; setd "mobs_"+ .@e, 0; } else if ( getd ( ".a2"+ .@i +"_"+ .@j ) == 2 ) { .@amount = getd ( "exp_"+ .@e ); setd "exp_"+ .@e, .@amount + strmobinfo ( 6, killedrid ); if ( getd ( "exp_"+ .@e ) < getd ( ".a4"+ .@i +"_"+ .@j ) ) end ; setd "evo"+ .@e, getd ( "evo"+ .@e ) + 1; setd "exp_"+ .@e, 0; } else debugmes "Script Items_Evo, error: wrong mode."; announce getitemname ( .@e ) +" is now "+ getd ( "evo"+ .@e ) +"% from evolving...", bc_self, "0x"+ .c$[0] ; specialeffect2 58 ; sleep2 200 ; specialeffect2 383 ; if ( getd ( "evo"+ .@e ) >= 100 && .auto ) { specialeffect2 263 ; sleep2 500 ; specialeffect2 377 ; sleep2 300 ; specialeffect2 542 ; sleep2 300 ; announce getitemname ( .@e ) +" is evolving..." , bc_self, "0x"+ .c$[1] ; .@i = 3; while ( .@i-- ) { specialeffect2 521 ; sleep2 900 ; } specialeffect2 463 ; sleep2 200; specialeffect2 665 ; sleep2 500 ; setarray .@card[1], getequipcardid ( .slots[.@a], 0 ), getequipcardid ( .slots[.@a], 1 ), getequipcardid ( .slots[.@a], 2 ), getequipcardid ( .slots[.@a], 3 ); .@refine = getequiprefinerycnt ( .slots[.@a] ); //unequip .slots[.@a]; //delitem .@e, 1 ; getitem2 getd ( ".a1"+ .@i +"_"+ ( .@j + 1 ) ) , 1, 1, .@refine, 0, .@card[1], .@card[2], .@card[3], .@card[4] ; equip getd ( ".a1"+ .@i +"_"+ ( .@j + 1 ) ) ; setd "evo"+ .@e, 0; deletearray @wing ; announce "Congratulations, your wings have evolved to "+ getitemname ( getd ( ".a1"+ .@i +"_"+ ( .@j + 1 ) ) ) +"." , bc_self , "0x"+ .c$[2] ; } } end ; } Also, what kind of items are that? Do they have special flags or are bound ones?
  4. I missed a ) in the for. for ( .@args = getargcount ( ); .@a < .@args ; .@a+=4 change to:
  5. Changed the loops. - script Items_Conf -1,{ OnInit: callsub Ids, 60656, 1, 1004, 1, 60657, 1, 1004, 1, 60658, 1, 1004, 0 ; callsub Ids, 60635, 1, 111, 1, 60636, 1, 111, 1, 60637, 1, 111, 0 ; /* ID[...], evolution mode[...], mob id[...], neccessary to get 1%[...]. If you want any monster, use 111. Evolution modes: 1 = Every X numer of mobs (1%). 2 = Experience (1%). */ /* 0 = Won't be evolved automatically. 1 = Will be evolved automatically */ .auto = 1; /* Color of the announces. */ setarray .c$[0], "4db557", // % of evolution. "d43438", // Wings evolving. "4da5b5"; // Wings evolved. /* slots to check. EQI_ACC_L (0) - Accessory 1 EQI_ACC_R (1) - Accessory 2 EQI_SHOES (2) - Footgear (shoes, boots) EQI_GARMENT (3) - Garment (mufflers, hoods, manteaux) EQI_HEAD_LOW (4) - Lower Headgear (beards, some masks) EQI_HEAD_MID (5) - Middle Headgear (masks, glasses) EQI_HEAD_TOP (6) - Upper Headgear EQI_ARMOR (7) - Armor (jackets, robes) EQI_HAND_L (8) - Left hand (weapons, shields) EQI_HAND_R (9) - Right hand (weapons) EQI_COSTUME_HEAD_TOP (10) - Upper Costume Headgear EQI_COSTUME_HEAD_MID (11) - Middle Costume Headgear EQI_COSTUME_HEAD_LOW (12) - Lower Costume Headgear EQI_COSTUME_GARMENT (13) - Costume Garment EQI_AMMO (14) - Arrow/Ammunition EQI_SHADOW_ARMOR (15) - Shadow Armor EQI_SHADOW_WEAPON (16) - Shadow Weapon EQI_SHADOW_SHIELD (17) - Shadow Shield EQI_SHADOW_SHOES (18) - Shadow Shoes EQI_SHADOW_ACC_R (19) - Shadow Accessory 2 EQI_SHADOW_ACC_L (20) - Shadow Accessory 1 */ setarray .slots[0], EQI_HEAD_LOW, EQI_HEAD_MID, EQI_HEAD_TOP; //============================================= end ; Ids: for ( .@args = getargcount ( ); .@a < .@args ; .@a+=4 { .@i = .w2[.w1]++; setd ".a1"+ .w1 +"_"+ .@i, getarg ( .@a ); // id. setd ".a2"+ .w1 +"_"+ .@i, getarg ( .@a + 1 ); // mode. setd ".a3"+ .w1 +"_"+ .@i, getarg ( .@a + 2 ); // mob id. setd ".a4"+ .w1 +"_"+ .@i, getarg ( .@a + 3 ); // amount. } .w1++; return ; OnNPCKillEvent: // Cache. That old loop on every mob killed... if ( @wing[0] && isequipped ( @wing[0] ) ) { .@c = 1; .@e = @wing[0]; .@i = @wing[1]; .@j = @wing[2]; .@a = @wing[3]; } else { for ( .@size = getarraysize ( .slots ); .@a < .@size && !.@c ; .@a++ ) { .@e = getequipid ( .slots[.@a] ); if ( .@e < 0 ) continue ; .@i = 0; while ( .@i < .w1 && !.@c ) { .@j = 0; while ( .@j < .w2[.@i] && !.@c ) { if ( .@e == getd ( ".a1"+ .@i +"_"+ .@j ) && getd ( ".a1"+ .@i +"_"+ ( .@j + 1 ) ) ) { if ( getd ( ".a4"+ .@i +"_"+ .@j ) > 0 && ( killedrid == getd ( ".a3"+ .@i +"_"+ .@j ) || getd ( ".a3"+ .@i +"_"+ .@j ) < 1001 ) ) { .@c = 1; setarray @wing[0], .@e, .@i, .@j, .@a; } } .@j++; } .@i++; } } } if ( .@c ) { if ( getd ( ".a2"+ .@i +"_"+ .@j ) == 1 ) { .@amount = getd ( "mobs_"+ .@e ); setd "mobs_"+ .@e, .@amount + 1; if ( getd ( "mobs_"+ .@e ) < getd ( ".a4"+ .@i +"_"+ .@j ) ) end ; setd "evo"+ .@e, getd ( "evo"+ .@e ) + 1; setd "mobs_"+ .@e, 0; } else if ( getd ( ".a2"+ .@i +"_"+ .@j ) == 2 ) { .@amount = getd ( "exp_"+ .@e ); setd "exp_"+ .@e, .@amount + strmobinfo ( 6, killedrid ); if ( getd ( "exp_"+ .@e ) < getd ( ".a4"+ .@i +"_"+ .@j ) ) end ; setd "evo"+ .@e, getd ( "evo"+ .@e ) + 1; setd "exp_"+ .@e, 0; } else debugmes "Script Items_Evo, error: wrong mode."; announce getitemname ( .@e ) +" is now "+ getd ( "evo"+ .@e ) +"% from evolving...", bc_self, "0x"+ .c$[0] ; specialeffect2 58 ; sleep2 200 ; specialeffect2 383 ; if ( getd ( "evo"+ .@e ) >= 100 && .auto ) { specialeffect2 263 ; sleep2 500 ; specialeffect2 377 ; sleep2 300 ; specialeffect2 542 ; sleep2 300 ; announce getitemname ( .@e ) +" is evolving..." , bc_self, "0x"+ .c$[1] ; .@i = 3; while ( .@i-- ) { specialeffect2 521 ; sleep2 900 ; } specialeffect2 463 ; sleep2 200; specialeffect2 665 ; sleep2 500 ; setarray .@card[1], getequipcardid ( .slots[.@a], 0 ), getequipcardid ( .slots[.@a], 1 ), getequipcardid ( .slots[.@a], 2 ), getequipcardid ( .slots[.@a], 3 ); .@refine = getequiprefinerycnt ( .slots[.@a] ); unequip .slots[.@a]; delitem .@e, 1 ; getitem2 getd ( ".a1"+ .@i +"_"+ ( .@j + 1 ) ) , 1, 1, .@refine, 0, .@card[1], .@card[2], .@card[3], .@card[4] ; equip getd ( ".a1"+ .@i +"_"+ ( .@j + 1 ) ) ; setd "evo"+ .@e, 0; deletearray @wing ; announce "Congratulations, your wings have evolved to "+ getitemname ( getd ( ".a1"+ .@i +"_"+ ( .@j + 1 ) ) ) +"." , bc_self , "0x"+ .c$[2] ; } } end ; }
  6. - script Items_Conf -1,{ OnInit: callsub Ids, 60656, 1, 1004, 1, 60657, 1, 1004, 1, 60658, 1, 1004, 0 ; callsub Ids, 60635, 1, 111, 1, 60636, 1, 111, 1, 60637, 1, 111, 0 ; /* ID[...], evolution mode[...], mob id[...], neccessary to get 1%[...]. If you want any monster, use 111. Evolution modes: 1 = Every X numer of mobs (1%). 2 = Experience (1%). */ /* 0 = Won't be evolved automatically. 1 = Will be evolved automatically */ .auto = 1; /* Color of the announces. */ setarray .c$[0], "4db557", // % of evolution. "d43438", // Wings evolving. "4da5b5"; // Wings evolved. /* slots to check. EQI_ACC_L (0) - Accessory 1 EQI_ACC_R (1) - Accessory 2 EQI_SHOES (2) - Footgear (shoes, boots) EQI_GARMENT (3) - Garment (mufflers, hoods, manteaux) EQI_HEAD_LOW (4) - Lower Headgear (beards, some masks) EQI_HEAD_MID (5) - Middle Headgear (masks, glasses) EQI_HEAD_TOP (6) - Upper Headgear EQI_ARMOR (7) - Armor (jackets, robes) EQI_HAND_L (8) - Left hand (weapons, shields) EQI_HAND_R (9) - Right hand (weapons) EQI_COSTUME_HEAD_TOP (10) - Upper Costume Headgear EQI_COSTUME_HEAD_MID (11) - Middle Costume Headgear EQI_COSTUME_HEAD_LOW (12) - Lower Costume Headgear EQI_COSTUME_GARMENT (13) - Costume Garment EQI_AMMO (14) - Arrow/Ammunition EQI_SHADOW_ARMOR (15) - Shadow Armor EQI_SHADOW_WEAPON (16) - Shadow Weapon EQI_SHADOW_SHIELD (17) - Shadow Shield EQI_SHADOW_SHOES (18) - Shadow Shoes EQI_SHADOW_ACC_R (19) - Shadow Accessory 2 EQI_SHADOW_ACC_L (20) - Shadow Accessory 1 */ setarray .slots[0], EQI_HEAD_LOW, EQI_HEAD_MID, EQI_HEAD_TOP; //============================================= .w1 = 0; end ; Ids: .@index = .w1; .w1++; for ( .@args = getargcount ( ); .@a < .@args ; .@a+=4 ) { .@i = ++.w2[.@index]; setd ".a1"+ .w1 +"_"+ .@i, getarg ( .@a ); // id. setd ".a2"+ .w1 +"_"+ .@i, getarg ( .@a + 1 ); // mode. setd ".a3"+ .w1 +"_"+ .@i, getarg ( .@a + 2 ); // mob id. setd ".a4"+ .w1 +"_"+ .@i, getarg ( .@a + 3 ); // amount. } return ; OnNPCKillEvent: // Cache. That old loop on every mob killed... if ( @wing[0] && isequipped ( @wing[0] ) ) { .@c = 1; .@e = @wing[0]; .@w = @wing[1]; .@id = @wing[2]; .@a = @wing[3]; } else { for ( .@size = getarraysize ( .slots ); .@a < .@size && !.@c ; .@a++ ) { .@e = getequipid ( .slots[.@a] ); if ( .@e < 0 ) continue ; .@id = 0; .@w = 1; while ( .@id++ <= .w2[.@w - 1] && !.@c ) { if ( .@id > .w2[.@w - 1] ) { .@id = 1; .@w++; } if ( .@e == getd ( ".a1"+ .@w +"_"+ .@id ) && getd ( ".a1"+ .@w +"_"+ ( .@id + 1 ) ) ) if ( getd ( ".a4"+ .@w +"_"+ .@id ) > 0 && ( killedrid == getd ( ".a3"+ .@w +"_"+ .@id ) || getd ( ".a3"+ .@w +"_"+ .@id ) < 1001 ) ) { .@c = 1; setarray @wing[0], .@e, .@w, .@id, .@a; } } } } if ( .@c ) { if ( getd ( ".a2"+ .@w +"_"+ .@id ) == 1 ) { .@amount = getd ( "mobs_"+ .@e ); setd "mobs_"+ .@e, .@amount + 1; if ( getd ( "mobs_"+ .@e ) < getd ( ".a4"+ .@w +"_"+ .@id ) ) end ; setd "evo"+ .@e, getd ( "evo"+ .@e ) + 1; setd "mobs_"+ .@e, 0; } else if ( getd ( ".a2"+ .@w +"_"+ .@id ) == 2 ) { .@amount = getd ( "exp_"+ .@e ); setd "exp_"+ .@e, .@amount + strmobinfo ( 6, killedrid ); if ( getd ( "exp_"+ .@e ) < getd ( ".a4"+ .@w +"_"+ .@id ) ) end ; setd "evo"+ .@e, getd ( "evo"+ .@e ) + 1; setd "exp_"+ .@e, 0; } else debugmes "Script Items_Evo, error: wrong mode."; announce getitemname ( .@e ) +" is now "+ getd ( "evo"+ .@e ) +"% from evolving...", bc_self, "0x"+ .c$[0] ; specialeffect2 58 ; sleep2 200 ; specialeffect2 383 ; if ( getd ( "evo"+ .@e ) >= 100 && .auto ) { specialeffect2 263 ; sleep2 500 ; specialeffect2 377 ; sleep2 300 ; specialeffect2 542 ; sleep2 300 ; announce getitemname ( .@e ) +" is evolving..." , bc_self, "0x"+ .c$[1] ; .@i = 3; while ( .@i-- ) { specialeffect2 521 ; sleep2 900 ; } specialeffect2 463 ; sleep2 200; specialeffect2 665 ; sleep2 500 ; setarray .@card[1], getequipcardid ( .slots[.@a], 0 ), getequipcardid ( .slots[.@a], 1 ), getequipcardid ( .slots[.@a], 2 ), getequipcardid ( .slots[.@a], 3 ); .@refine = getequiprefinerycnt ( .slots[.@a] ); unequip .slots[.@a]; delitem .@e, 1 ; getitem2 getd ( ".a1"+ .@w +"_"+ ( .@id + 1 ) ) , 1, 1, .@refine, 0, .@card[1], .@card[2], .@card[3], .@card[4] ; equip getd ( ".a1"+ .@w +"_"+ ( .@id + 1 ) ) ; setd "evo"+ .@e, 0; deletearray @wing ; announce "Congratulations, your wings have evolved to "+ getitemname ( getd ( ".a1"+ .@w +"_"+ ( .@id + 1 ) ) ) +"." , bc_self , "0x"+ .c$[2] ; } } end ; }
  7. Sorry. And hello Giant Whisper. - script Items_Conf -1,{ OnInit: callsub Ids, 60656, 1, 1004, 1, 60657, 1, 1004, 1, 60658, 1, 1004, 0 ; callsub Ids, 60635, 1, 111, 1, 60636, 1, 111, 1, 60637, 1, 111, 0 ; /* ID[...], evolution mode[...], mob id[...], neccessary to get 1%[...]. If you want any monster, use 111. Evolution modes: 1 = Every X numer of mobs (1%). 2 = Experience (1%). */ /* 0 = Won't be evolved automatically. 1 = Will be evolved automatically */ .auto = 1; /* Color of the announces. */ setarray .c$[0], "4db557", // % of evolution. "d43438", // Wings evolving. "4da5b5"; // Wings evolved. /* slots to check. EQI_ACC_L (0) - Accessory 1 EQI_ACC_R (1) - Accessory 2 EQI_SHOES (2) - Footgear (shoes, boots) EQI_GARMENT (3) - Garment (mufflers, hoods, manteaux) EQI_HEAD_LOW (4) - Lower Headgear (beards, some masks) EQI_HEAD_MID (5) - Middle Headgear (masks, glasses) EQI_HEAD_TOP (6) - Upper Headgear EQI_ARMOR (7) - Armor (jackets, robes) EQI_HAND_L (8) - Left hand (weapons, shields) EQI_HAND_R (9) - Right hand (weapons) EQI_COSTUME_HEAD_TOP (10) - Upper Costume Headgear EQI_COSTUME_HEAD_MID (11) - Middle Costume Headgear EQI_COSTUME_HEAD_LOW (12) - Lower Costume Headgear EQI_COSTUME_GARMENT (13) - Costume Garment EQI_AMMO (14) - Arrow/Ammunition EQI_SHADOW_ARMOR (15) - Shadow Armor EQI_SHADOW_WEAPON (16) - Shadow Weapon EQI_SHADOW_SHIELD (17) - Shadow Shield EQI_SHADOW_SHOES (18) - Shadow Shoes EQI_SHADOW_ACC_R (19) - Shadow Accessory 2 EQI_SHADOW_ACC_L (20) - Shadow Accessory 1 */ setarray .slots[0], EQI_HEAD_LOW, EQI_HEAD_MID, EQI_HEAD_TOP; //============================================= .w1 = 0; end ; Ids: .@index = .w1; .w1++; for ( .@args = getargcount ( ); .@a < .@args ; .@a+=4 ) { .@i = ++.w2[.@index]; setd ".a1"+ .w1 +"_"+ .@i, getarg ( .@a ); // id. setd ".a2"+ .w1 +"_"+ .@i, getarg ( .@a + 1 ); // mode. setd ".a3"+ .w1 +"_"+ .@i, getarg ( .@a + 2 ); // mob id. setd ".a4"+ .w1 +"_"+ .@i, getarg ( .@a + 3 ); // amount. } return ; OnNPCKillEvent: // Cache. That old loop on every mob killed... if ( @wing[0] && isequipped ( @wing[0] ) ) { .@c = 1; .@e = @wing[0]; .@w = @wing[1]; .@id = @wing[2]; .@a = @wing[3]; } else { for ( .@size = getarraysize ( .slots ); .@a < .@size && !.@c ; .@a++ ) { .@e = getequipid ( .slots[.@a] ); if ( .@e < 0 ) continue ; .@id = 0; .@w = 1; while ( .@id++ <= .w2[.@w - 1] && !.@c ) { if ( .@id > .w2[.@w - 1] ) { .@id = 1; .@w++; } if ( .@e == getd ( ".a1"+ .@w +"_"+ .@id ) && getd ( ".a1"+ .@w +"_"+ ( .@id + 1 ) ) ) if ( getd ( ".a4"+ .@w +"_"+ .@id ) > 0 && ( killedrid == getd ( ".a3"+ .@w +"_"+ .@id ) || getd ( ".a3"+ .@w +"_"+ .@id ) < 1001 ) ) { .@c = 1; setarray @wing[0], .@e, .@w, .@id, .@a; } } } } if ( .@c ) { if ( getd ( ".a2"+ .@w +"_"+ .@id ) == 1 ) { .@amount = getd ( "mobs_"+ .@e ); setd "mobs_"+ .@e, .@amount + 1; if ( getd ( "mobs_"+ .@e ) < getd ( ".a4"+ .@w +"_"+ .@id ) ) end ; setd "evo"+ .@e, getd ( "evo"+ .@e ) + 1; setd "mobs_"+ .@e, 0; } else if ( getd ( ".a2"+ .@w +"_"+ .@id ) == 2 ) { .@amount = getd ( "exp_"+ .@e ); setd "exp_"+ .@e, .@amount + strmobinfo ( 6, killedrid ); if ( getd ( "exp_"+ .@e ) < getd ( ".a4"+ .@w +"_"+ .@id ) ) end ; setd "evo"+ .@e, getd ( "evo"+ .@e ) + 1; setd "exp_"+ .@e, 0; } else debugmes "Script Items_Evo, error: wrong mode."; announce getitemname ( .@e ) +" is now "+ getd ( "evo"+ .@e ) +"% from evolving...", bc_self, "0x"+ .c$[0] ; specialeffect2 58 ; sleep2 200 ; specialeffect2 383 ; if ( getd ( "evo"+ .@e ) >= 100 && .auto ) { specialeffect2 263 ; sleep2 500 ; specialeffect2 377 ; sleep2 300 ; specialeffect2 542 ; sleep2 300 ; announce getitemname ( .@e ) +" is evolving..." , bc_self, "0x"+ .c$[1] ; .@i = 3; while ( .@i-- ) { specialeffect2 521 ; sleep2 900 ; } specialeffect2 463 ; sleep2 200; specialeffect2 665 ; sleep2 500 ; setarray .@card[1], getequipcardid ( .slots[.@a], 0 ), getequipcardid ( .slots[.@a], 1 ), getequipcardid ( .slots[.@a], 2 ), getequipcardid ( .slots[.@a], 3 ); .@refine = getequiprefinerycnt ( .slots[.@a] ); unequip .@a; delitem .@e, 1 ; getitem2 getd ( ".a1"+ .@w +"_"+ ( .@id + 1 ) ) , 1, 1, .@refine, 0, .@card[1], .@card[2], .@card[3], .@card[4] ; equip getd ( ".a1"+ .@w +"_"+ ( .@id + 1 ) ) ; setd "evo"+ .@e, 0; deletearray @wing ; announce "Congratulations, your wings have evolved to "+ getitemname ( getd ( ".a1"+ .@w +"_"+ ( .@id + 1 ) ) ) +"." , bc_self , "0x"+ .c$[2] ; } } end ; }
  8. //===== Hercules Script ====================================== //= Wheel of Fortune //===== By =================================================== //= Habilis //= Edited by Myriad //===== Version ============================================== //= 1.02 - June 15, 2018 // - Made the script work with zeny, to be more accesibly to everyone. //= 1.01 - June 14, 2018 // - Added @wheel_of_fortune GM command (level 98+). // - Merged S_Pay and S_Loop subs into main line of text. // - S_Gamble is now S_Spin and it will 'return' instead of // calling back to the initial sub. //= 1.00 - June 13, 2018 // - Initial script edit for Habilis. //===== Description ========================================== //= Wheel of fortune something. //============================================================ - script Wheel_of_Fortune -1,{ OnInit: disablenpc("Wheel of Fortune#Main"); .EventName$ = "[Wheel Of Fortune]"; end; OnClock0900: OnClock1600: OnClock2200: OnStart: .Start = true; announce(sprintf("%s : The event will begin in 1 minute, near the center of Prontera.", .EventName$), bc_blue | bc_all); initnpctimer(); end; OnTimer60000: // 1 min enablenpc("Wheel of Fortune#Main"); announce(sprintf("%s : Come to Prontera and test your luck", .EventName$), bc_yellow | bc_all); end; OnTimer60500: // 1 mins announce(sprintf("%s : One minute, do your last spin!", .EventName$), bc_yellow | bc_all); end; OnTimer120000: // 2 mins OnStop: .Start = false; stopnpctimer(); disablenpc("Wheel of Fortune#Main"); end; OnCommand: if (.@atcmd_numparameters != 1) { dispbottom(sprintf("Usage: %s <start/end>", .@atcmd_command$), 0x00FF00); dispbottom(sprintf("%s failed.", .@atcmd_command$), 0x00FF00); end; } if (.@atcmd_parameters$[0] == "start") { if (!.Start) donpcevent(sprintf("%s::OnStart", strnpcinfo(NPC_NAME))); else { dispbottom("The Wheel of Fortune has already started.", 0x00FF00); dispbottom(sprintf("%s failed.", .@atcmd_command$), 0x00FF00); } } else if (.@atcmd_parameters$[0] == "end") { if (.Start) donpcevent(sprintf("%s::OnEnd", strnpcinfo(NPC_NAME))); else { dispbottom("The Wheel of Fortune is not active.", 0x00FF00); dispbottom(sprintf("%s failed.", .@atcmd_command$), 0x00FF00); } } else { dispbottom(sprintf("Usage: %s <start/end>", .@atcmd_command$), 0x00FF00); dispbottom(sprintf("%s failed.", .@atcmd_command$), 0x00FF00); } end; } prontera,164,169,1 script Wheel of Fortune#Main 2_SLOT_MACHINE,{ OnTalk: if (Zeny < .Zeny_Cost && #freewheelfortunespin < 0) { mes("[^0055FFLucky Spin^000000]", .EventName$); mes("You are out of Zeny"); mes("and have no more"); mes("free spins. Come back"); mes("next time for more!"); close(); } .@mes$ = (#freewheelfortunespin > 0) ? sprintf(", but you, my friend, have %d free spin%s!", #freewheelfortunespin, (#freewheelfortunespin == 1) ? "" : "s") : "."; addtimer(1, sprintf("%s::OnEnd", strnpcinfo(NPC_NAME))); mes("[^0055FFLucky Spin^000000]", .EventName$); mes("Do you want to spin the wheel?"); mes("It costs ^FF000050.000 Zeny^000000 to play", .@mes$); next(); while (true) { if (Zeny < .Zeny_Cost && #freewheelfortunespin < 0) callsub(S_End); switch (select( (#freewheelfortunespin > 0) ? sprintf("Yes! Use free spin! (%d left)", #freewheelfortunespin) : "", (Zeny >= .Zeny_Cost ) ? sprintf("Yes! Use Zeny. (costs %dz)", .Zeny_Cost) : "", "No (Leave)" )) { // pay with free spin case 1: if (#freewheelfortunespin > 0) { if ((#freewheelfortunespin -= 1) < 0) #freewheelfortunespin = 0; callsub(S_Spin); } else callsub(S_End); break; // Pay with zeny case 2: if (Zeny >= .Zeny_Cost) { Zeny -= .Zeny_Cost; callsub(S_Spin); } else { cutin("aca_salim02", 2); mes("[^0055FFLucky Spin^000000]", .EventName$); mes("Awww, you don't have enough to gamble..."); mes(" "); mes("Have you ever heard?"); mes("'Money isn't all that matters' Got it?"); mes("Byeeeeeeeeeeeeee ;)"); callsub(S_End); } break; default: break; } callsub(S_End); } // Wheel spin animation S_Spin: .@Sector = rand(.Sector_Range[0], .Sector_Range[1]); .@Display = .@Sector * 2 - 1; .@Speed = .Spin_Speed; for (.@i = 0; .@i < .nbTurns; .@i++) { .@b = .Cutin_Range[0] - 1; while (.@b <= (.Cutin_Range[1] - 1)) { cutin(sprintf("%s%d", .Cutin$, .@b), 4); sleep2(.@Speed); .@b++; .@Speed += 1; // not ++, because you may want to adjust the stopping +1 +2 +3 } } .@b = .Cutin_Range[0] - 1; while (.@b < .@Display) { cutin(sprintf("%s%d", .Cutin$, .@b), 4); sleep2(.@Speed); .@b++; } cutin(sprintf("%s%d", .Cutin$, .@b), 4); if (.Prize_ID[.@Sector] == -1) { // Free spin if (.Sound_Effects) soundeffect("wheel_jackpot.wav", 0); announce(sprintf("[%s] : Wow, %dx more Free spins!!!", .EventName$, .Prize_Qty[.@Sector]), bc_blue | bc_self); #freewheelfortunespin = #freewheelfortunespin == 0 ? .Prize_Qty[.@Sector] : #freewheelfortunespin + .Prize_Qty[.@Sector]; } else if (.Prize_ID[.@Sector] == 0) { // Nothing if (.Sound_Effects) soundeffect("wheel_lost.wav", 0); announce(sprintf("[%s] : Awwww, no luck in your gamble, more luck in love...", .EventName$), bc_blue | bc_self); } else { // Item if (.Sound_Effects) soundeffect("wheel_won.wav", 0); announce(sprintf("[%s] : %dx %s - enjoy your prize!", .EventName$, .Prize_Qty[.@Sector], getitemname(.Prize_ID[.@Sector])), bc_blue | bc_self); getitem(.Prize_ID[.@Sector], .Prize_Qty[.@Sector]); } sleep2(1000); if (Zeny < .Zeny_Cost && #freewheelfortunespin < 0) { mes("[^0055FFLucky Spin^000000]", .EventName$); mes("You are out of Zeny"); mes("and have no more"); mes("free spins. Come back"); mes("next time for more!"); close(); } return; S_End: close2(); OnEnd: cutin("", 255); end; OnInit: .EventName$ = "Wheel Of Fortune"; bindatcmd("wheel_of_fortune", "Wheel_of_Fortune::OnCommand", 98,false); .Spin_Speed = 50; // What is the base spin speed? (ms) .nbTurns = 2; // How many times the arrow makes a complete turn, before entering the stopping routine .Zeny_Cost = 50000; // How much zeny does it cost for a spin? .Sound_Effects = true; // Enable sound effects? (true/false) // You must have a total of 10 prizes. DO NOT remove 0 or -1 from the array and do not // change their order. setarray(.Prize_ID[1], -1, 7539, 14345, 7539, 617, 607, 7539, 604, 0, 12214); setarray(.Prize_Qty[1], 2, 3, 1, 1, 3, 3, 1, 3, 0, 1); // Don't touch below .Cutin$ = "WheelOfFortune_"; setarray .Sector_Range[0], 1, 10; // Sector range setarray .Cutin_Range[0], 1, 20; // Cutin range end; }
  9. - script Items_Conf -1,{ OnInit: callsub Ids, 60656, 1, 1004, 1, 60657, 1, 1004, 1, 60658, 1, 1004, 0 ; callsub Ids, 60635, 1, 111, 1, 60636, 1, 111, 1, 60637, 1, 111, 0 ; /* ID[...], evolution mode[...], mob id[...], neccessary to get 1%[...]. If you want any monster, use 111. Evolution modes: 1 = Every X numer of mobs (1%). 2 = Experience (1%). */ /* 0 = Won't be evolved automatically. 1 = Will be evolved automatically */ .auto = 1; /* Color of the announces. */ setarray .c$[0], "4db557", // % of evolution. "d43438", // Wings evolving. "4da5b5"; // Wings evolved. /* slots to check. EQI_ACC_L (0) - Accessory 1 EQI_ACC_R (1) - Accessory 2 EQI_SHOES (2) - Footgear (shoes, boots) EQI_GARMENT (3) - Garment (mufflers, hoods, manteaux) EQI_HEAD_LOW (4) - Lower Headgear (beards, some masks) EQI_HEAD_MID (5) - Middle Headgear (masks, glasses) EQI_HEAD_TOP (6) - Upper Headgear EQI_ARMOR (7) - Armor (jackets, robes) EQI_HAND_L (8) - Left hand (weapons, shields) EQI_HAND_R (9) - Right hand (weapons) EQI_COSTUME_HEAD_TOP (10) - Upper Costume Headgear EQI_COSTUME_HEAD_MID (11) - Middle Costume Headgear EQI_COSTUME_HEAD_LOW (12) - Lower Costume Headgear EQI_COSTUME_GARMENT (13) - Costume Garment EQI_AMMO (14) - Arrow/Ammunition EQI_SHADOW_ARMOR (15) - Shadow Armor EQI_SHADOW_WEAPON (16) - Shadow Weapon EQI_SHADOW_SHIELD (17) - Shadow Shield EQI_SHADOW_SHOES (18) - Shadow Shoes EQI_SHADOW_ACC_R (19) - Shadow Accessory 2 EQI_SHADOW_ACC_L (20) - Shadow Accessory 1 */ setarray .slots[0], EQI_HEAD_LOW, EQI_HEAD_MID, EQI_HEAD_TOP; //============================================= .w1 = 0; end ; Ids: .@index = .w1; .w1++; for ( .@args = getargcount ( ); .@a < .@args ; .@a+=4 ) { .@i = ++.w2[.@index]; setd ".a1"+ .w1 +"_"+ .@i, getarg ( .@a ); // id. setd ".a2"+ .w1 +"_"+ .@i, getarg ( .@a + 1 ); // mode. setd ".a3"+ .w1 +"_"+ .@i, getarg ( .@a + 2 ); // mob id. setd ".a4"+ .w1 +"_"+ .@i, getarg ( .@a + 3 ); // amount. } return ; OnNPCKillEvent: // Cache. That old loop on every mob killed... if ( @wing[0] && isequipped ( @wing[0] ) ) { .@c = 1; .@e = @wing[0]; .@w = @wing[1]; .@id = @wing[2]; .@a = @wing[3]; } else { for ( .@size = getarraysize ( .slots ); .@a < .@size && !.@c ; .@a++ ) { .@e = getequipid ( .slots[.@a] ); if ( .@e < 0 ) continue ; .@id = 0; .@w = 1; while ( .@id++ <= .w2[.@w - 1] && !.@c ) { if ( .@id > .w2[.@w - 1] ) { .@id = 1; .@w++; } if ( .@e == getd ( ".a1"+ .@w +"_"+ .@id ) && getd ( ".a1"+ .@w +"_"+ ( .@id + 1 ) ) ) if ( getd ( ".a4"+ .@w +"_"+ .@id ) > 0 && ( killedrid == getd ( ".a3"+ .@w +"_"+ .@id ) || getd ( ".a3"+ .@w +"_"+ .@id ) < 1001 ) ) { .@c = 1; setarray @wing[0], .@e, .@w, .@id, .@e, .@a; } } } } if ( .@c ) { if ( getd ( ".a2"+ .@w +"_"+ .@id ) == 1 ) { .@amount = getd ( "mobs_"+ .@e ); setd "mobs_"+ .@e, .@amount + 1; if ( getd ( "mobs_"+ .@e ) < getd ( ".a4"+ .@w +"_"+ .@id ) ) end ; setd "evo"+ .@e, getd ( "evo"+ .@e ) + 1; setd "mobs_"+ .@e, 0; } else if ( getd ( ".a2"+ .@w +"_"+ .@id ) == 2 ) { .@amount = getd ( "exp_"+ .@e ); setd "exp_"+ .@e, .@amount + strmobinfo ( 6, killedrid ); if ( getd ( "exp_"+ .@e ) < getd ( ".a4"+ .@w +"_"+ .@id ) ) end ; setd "evo"+ .@e, getd ( "evo"+ .@e ) + 1; setd "exp_"+ .@e, 0; } else debugmes "Script Items_Evo, error: wrong mode."; announce getitemname ( .@e ) +" is now "+ getd ( "evo"+ .@e ) +"% from evolving...", bc_self, "0x"+ .c$[0] ; specialeffect2 58 ; sleep2 200 ; specialeffect2 383 ; if ( getd ( "evo"+ .@e ) >= 100 && .auto ) { specialeffect2 263 ; sleep2 500 ; specialeffect2 377 ; sleep2 300 ; specialeffect2 542 ; sleep2 300 ; announce getitemname ( .@e ) +" is evolving..." , bc_self, "0x"+ .c$[1] ; .@i = 3; while ( .@i-- ) { specialeffect2 521 ; sleep2 900 ; } specialeffect2 463 ; sleep2 200; specialeffect2 665 ; sleep2 500 ; setarray .@card[1], getequipcardid ( .slots[.@a], 0 ), getequipcardid ( .slots[.@a], 1 ), getequipcardid ( .slots[.@a], 2 ), getequipcardid ( .slots[.@a], 3 ); .@refine = getequiprefinerycnt ( .slots[.@a] ); unequip .@a; delitem .@e, 1 ; getitem2 getd ( ".a1"+ .@w +"_"+ ( .@id + 1 ) ) , 1, 1, .@refine, 0, .@card[1], .@card[2], .@card[3], .@card[4] ; equip getd ( ".a1"+ .@w +"_"+ ( .@id + 1 ) ) ; setd "evo"+ .@e, 0; deletearray @wing ; announce "Congratulations, your wings have evolved to "+ getitemname ( getd ( ".a1"+ .@w +"_"+ ( .@id + 1 ) ) ) +"." , bc_self , "0x"+ .c$[2] ; } } end ; }
  10. - script Rand_Monster -1,{ OnSpawn: monster .maps$[rand(.map_size)],0,0,"--ja--",2950,1,"Rand_Monster::OnSpawn"; end; OnInit: setarray .maps$[0], "alb_ship", "alb2trea", "alberta", "alberta_in", "alde_dun01", "alde_dun02", "alde_dun03", "alde_dun04", "aldeba_in", "aldebaran", "anthell01", "anthell02", "arena_room", "c_tower1", "c_tower2", "c_tower3", "c_tower4", "force_1-1", "force_1-2", "force_1-3", "force_2-1", "force_2-2", "force_2-3", "force_3-1", "force_3-2", "force_3-3", "gef_dun00", "gef_dun01", "gef_dun02", "gef_dun03", "gef_fild00", "gef_fild01", "gef_fild02", "gef_fild03", "gef_fild04", "gef_fild05", "gef_fild06", "gef_fild07", "gef_fild08", "gef_fild09", "gef_fild10", "gef_fild11", "gef_fild12", "gef_fild13", "gef_fild14", "gef_tower", "geffen", "geffen_in", "gl_cas01", "gl_cas02", "gl_church", "gl_chyard", "gl_dun01", "gl_dun02", "gl_in01", "gl_knt01", "gl_knt02", "gl_prison", "gl_prison1", "gl_sew01", "gl_sew02", "gl_sew03", "gl_sew04", "gl_step", "glast_01", "hunter_1-1", "hunter_2-1", "hunter_3-1", "in_hunter", "in_moc_16", "in_orcs01", "in_sphinx1", "in_sphinx2", "in_sphinx3", "in_sphinx4", "in_sphinx5", "iz_dun00", "iz_dun01", "iz_dun02", "iz_dun03", "iz_dun04", "job_sword1", "izlu2dun", "izlude", "izlude_in", "job_thief1", "knight_1-1", "knight_2-1", "knight_3-1", "mjo_dun01", "mjo_dun02", "mjo_dun03", "mjolnir_01", "mjolnir_02", "mjolnir_03", "mjolnir_04", "mjolnir_05", "mjolnir_06", "mjolnir_07", "mjolnir_08", "mjolnir_09", "mjolnir_10", "mjolnir_11", "mjolnir_12", "moc_castle", "moc_fild01", "moc_fild02", "moc_fild03", "moc_fild04", "moc_fild05", "moc_fild06", "moc_fild07", "moc_fild08", "moc_fild09", "moc_fild10", "moc_fild11", "moc_fild12", "moc_fild13", "moc_fild14", "moc_fild15", "moc_fild16", "moc_fild17", "moc_fild18", "moc_fild19", "moc_pryd01", "moc_pryd02", "moc_pryd03", "moc_pryd04", "moc_pryd05", "moc_pryd06", "moc_prydb1", "moc_ruins", "monk_in", "morocc", "morocc_in", "new_1-1", "new_1-2", "new_1-3", "new_1-4", "new_2-1", "new_2-2", "new_2-3", "new_2-4", "new_3-1", "new_3-2", "new_3-3", "new_3-4", "new_4-1", "new_4-2", "new_4-3", "new_4-4", "new_5-1", "new_5-2", "new_5-3", "new_5-4", "orcsdun01", "orcsdun02", "ordeal_1-1", "ordeal_1-2", "//ordeal_1-3", "//ordeal_1-4", "ordeal_2-1", "ordeal_2-2", "//ordeal_2-3", "//ordeal_2-4", "ordeal_3-1", "ordeal_3-2", "//ordeal_3-3", "//ordeal_3-4", "pay_arche", "pay_dun00", "pay_dun01", "pay_dun02", "pay_dun03", "pay_dun04", "pay_fild01", "pay_fild02", "pay_fild03", "pay_fild04", "pay_fild05", "pay_fild06", "pay_fild07", "pay_fild08", "pay_fild09", "pay_fild10", "pay_fild11", "payon", "payon_in01", "payon_in02", "priest_1-1", "priest_2-1", "priest_3-1", "prontera", "prt_are_in", "prt_are01", "pvp_room", "prt_castle", "prt_church", "prt_fild00", "prt_fild01", "prt_fild02", "prt_fild03", "prt_fild04", "prt_fild05", "prt_fild06", "prt_fild07", "prt_fild08", "prt_fild09", "prt_fild10", "prt_fild11", "prt_in", "prt_maze01", "prt_maze02", "prt_maze03", "prt_monk", "prt_sewb1", "prt_sewb2", "prt_sewb3", "prt_sewb4", "pvp_2vs2", "pvp_c_room", "pvp_n_1-1", "pvp_n_1-2", "pvp_n_1-3", "pvp_n_1-4", "pvp_n_1-5", "pvp_n_2-1", "pvp_n_2-2", "pvp_n_2-3", "pvp_n_2-4", "pvp_n_2-5", "pvp_n_3-1", "pvp_n_3-2", "pvp_n_3-3", "pvp_n_3-4", "pvp_n_3-5", "pvp_n_4-1", "pvp_n_4-2", "pvp_n_4-3", "pvp_n_4-4", "pvp_n_4-5", "pvp_n_5-1", "pvp_n_5-2", "pvp_n_5-3", "pvp_n_5-4", "pvp_n_5-5", "pvp_n_6-1", "pvp_n_6-2", "pvp_n_6-3", "pvp_n_6-4", "pvp_n_6-5", "pvp_n_7-1", "pvp_n_7-2", "pvp_n_7-3", "pvp_n_7-4", "pvp_n_7-5", "pvp_n_8-1", "pvp_n_8-2", "pvp_n_8-3", "pvp_n_8-4", "pvp_n_8-5", "pvp_n_room", "pvp_y_1-1", "pvp_y_1-2", "pvp_y_1-3", "pvp_y_1-4", "pvp_y_1-5", "pvp_y_2-1", "pvp_y_2-2", "pvp_y_2-3", "pvp_y_2-4", "pvp_y_2-5", "pvp_y_3-1", "pvp_y_3-2", "pvp_y_3-3", "pvp_y_3-4", "pvp_y_3-5", "pvp_y_4-1", "pvp_y_4-2", "pvp_y_4-3", "pvp_y_4-4", "pvp_y_4-5", "pvp_y_5-1", "pvp_y_5-2", "pvp_y_5-3", "pvp_y_5-4", "pvp_y_5-5", "pvp_y_6-1", "pvp_y_6-2", "pvp_y_6-3", "pvp_y_6-4", "pvp_y_6-5", "pvp_y_7-1", "pvp_y_7-2", "pvp_y_7-3", "pvp_y_7-4", "pvp_y_7-5", "pvp_y_8-1", "pvp_y_8-2", "pvp_y_8-3", "pvp_y_8-4", "pvp_y_8-5", "pvp_y_room", "sword_1-1", "sword_2-1", "sword_3-1", "treasure01", "treasure02", "wizard_1-1", "wizard_2-1", "wizard_3-1", "xmas", "xmas_dun01", "xmas_dun02", "xmas_fild01", "xmas_in", "beach_dun", "beach_dun2", "beach_dun3", "cmd_fild01", "cmd_fild02", "cmd_fild03", "cmd_fild04", "cmd_fild05", "cmd_fild06", "cmd_fild07", "cmd_fild08", "cmd_fild09", "cmd_in01", "cmd_in02", "comodo", "quiz_00", "quiz_01", "g_room1-1", "g_room1-2", "g_room1-3", "g_room2", "tur_dun01", "tur_dun02", "tur_dun03", "tur_dun04", "tur_dun05", "tur_dun06", "alde_gld", "aldeg_cas01", "aldeg_cas02", "aldeg_cas03", "aldeg_cas04", "aldeg_cas05", "gefg_cas01", "gefg_cas02", "gefg_cas03", "gefg_cas04", "gefg_cas05", "gld_dun01", "gld_dun02", "gld_dun03", "gld_dun04", "guild_room", "guild_vs1", "guild_vs2", "guild_vs3", "guild_vs4", "guild_vs5", "guild_vs1-1", "guild_vs1-2", "guild_vs1-3", "guild_vs1-4", "guild_vs2-1", "guild_vs2-2", "job_hunte", "job_knt", "job_prist", "job_wiz", "pay_gld", "payg_cas01", "payg_cas02", "payg_cas03", "payg_cas04", "payg_cas05", "prt_gld", "prtg_cas01", "prtg_cas02", "prtg_cas03", "prtg_cas04", "prtg_cas05", "alde_alche", "in_rogue", "job_cru", "job_duncer", "job_monk", "job_sage", "mag_dun01", "mag_dun02", "monk_test", "quiz_test", "yuno", "yuno_fild01", "yuno_fild02", "yuno_fild03", "yuno_fild04", "yuno_in01", "yuno_in02", "yuno_in03", "yuno_in04", "yuno_in05", "ama_dun01", "ama_dun02", "ama_dun03", "ama_fild01", "ama_in01", "ama_in02", "ama_test", "amatsu", "gon_dun01", "gon_dun02", "gon_dun03", "gon_fild01", "gon_in", "gon_test", "gonryun", "sec_in01", "sec_in02", "sec_pri", "umbala", "um_dun01", "um_dun02", "um_fild01", "um_fild02", "um_fild03", "um_fild04", "um_in", "niflheim", "nif_fild01", "nif_fild02", "nif_in", "yggdrasil01", "valkyrie", "himinn", "lou_in01", "lou_in02", "lou_dun03", "lou_dun02", "lou_dun01", "lou_fild01", "louyang", "siege_test", "n_castle", "nguild_gef", "nguild_prt", "nguild_pay", "nguild_alde", "jawaii", "jawaii_in", "gefenia01", "gefenia02", "gefenia03", "gefenia04", "new_zone01", "new_zone02", "new_zone03", "new_zone04", "payon_in03", "ayothaya", "ayo_in01", "ayo_in02", "ayo_fild01", "ayo_fild02", "ayo_dun01", "ayo_dun02", "que_god01", "que_god02", "yuno_fild05", "yuno_fild07", "yuno_fild08", "yuno_fild09", "yuno_fild11", "yuno_fild12", "alde_tt02", "turbo_n_1", "turbo_n_4", "turbo_n_8", "turbo_n_16", "turbo_e_4", "turbo_e_8", "turbo_e_16", "turbo_room", "airplane", "airport", "einbech", "einbroch", "ein_dun01", "ein_dun02", "ein_fild06", "ein_fild07", "ein_fild08", "ein_fild09", "ein_fild10", "ein_in01", "que_sign01", "que_sign02", "ein_fild03", "ein_fild04", "lhz_fild02", "lhz_fild03", "yuno_pre", "lhz_fild01", "lighthalzen", "lhz_in01", "lhz_in02", "lhz_in03", "lhz_que01", "lhz_dun01", "lhz_dun02", "lhz_dun03", "lhz_cube", "juperos_01", "juperos_02", "jupe_area1", "jupe_area2", "jupe_core", "jupe_ele", "jupe_ele_r", "jupe_gate", "y_airport", "lhz_airport", "airplane_01", "jupe_cave", "quiz_02", "hu_fild07", "hu_fild05", "hu_fild04", "hu_fild01", "yuno_fild06", "job_soul", "job_star", "que_job01", "que_job02", "que_job03", "abyss_01", "abyss_02", "abyss_03", "thana_step", "thana_boss", "tha_scene01", "tha_t01", "tha_t02", "tha_t03", "tha_t04", "tha_t07", "tha_t05", "tha_t06", "tha_t08", "tha_t09", "tha_t10", "tha_t11", "tha_t12", "auction_01", "auction_02", "hugel", "hu_in01", "que_bingo", "que_hugel", "p_track01", "p_track02", "odin_tem01", "odin_tem02", "odin_tem03", "hu_fild02", "hu_fild03", "hu_fild06", "ein_fild01", "ein_fild02", "ein_fild05", "yuno_fild10", "kh_kiehl02", "kh_kiehl01", "kh_dun02", "kh_dun01", "kh_mansion", "kh_rossi", "kh_school", "kh_vila", "force_map1", "force_map2", "force_map3", "job_hunter", "job_knight", "job_priest", "job_wizard", "ve_in02", "rachel", "ra_in01", "ra_fild01", "ra_fild02", "ra_fild03", "ra_fild04", "ra_fild05", "ra_fild06", "ra_fild07", "ra_fild08", "ra_fild09", "ra_fild10", "ra_fild11", "ra_fild12", "ra_fild13", "ra_san01", "ra_san02", "ra_san03", "ra_san04", "ra_san05", "ra_temin", "ra_temple", "ra_temsky", "que_rachel", "ice_dun01", "ice_dun02", "ice_dun03", "ice_dun04", "que_thor", "thor_camp", "thor_v01", "thor_v02", "thor_v03", "veins", "ve_in", "ve_fild01", "ve_fild02", "ve_fild03", "ve_fild04", "ve_fild05", "ve_fild06", "ve_fild07", "poring_c01", "poring_c02", "que_ng", "nameless_i", "nameless_n", "nameless_in", "abbey01", "abbey02", "abbey03", "poring_w01", "poring_w02", "que_san04", "moscovia", "mosk_in", "mosk_ship", "mosk_fild01", "mosk_fild02", "mosk_dun01", "mosk_dun02", "mosk_dun03", "mosk_que", "force_4-1", "force_5-1", "06guild_r", "06guild_01", "06guild_02", "06guild_03", "06guild_04", "06guild_05", "06guild_06", "06guild_07", "06guild_08", "z_agit", "que_temsky", "itemmall", "bossnia_01", "bossnia_02", "bossnia_03", "bossnia_04", "schg_cas01", "schg_cas02", "schg_cas03", "schg_cas04", "schg_cas05", "sch_gld", "cave", "moc_fild20", "moc_fild21", "moc_fild22", "que_ba", "que_moc_16", "que_moon", "arug_cas01", "arug_cas02", "arug_cas03", "arug_cas04", "arug_cas05", "aru_gld", "bat_room", "bat_a01", "bat_a02", "bat_b01", "bat_b02", "que_qsch01", "que_qsch02", "que_qsch03", "que_qsch04", "que_qsch05", "que_qaru01", "que_qaru02", "que_qaru03", "que_qaru04", "que_qaru05", "1@cata", "2@cata", "e_tower", "1@tower", "2@tower", "3@tower", "4@tower", "5@tower", "6@tower", "mid_camp", "mid_campin", "man_fild01", "man_fild03", "spl_fild02", "spl_fild03", "moc_fild22b", "que_dan01", "que_dan02", "schg_que01", "schg_dun01", "arug_que01", "arug_dun01", "1@orcs", "2@orcs", "1@nyd", "2@nyd", "nyd_dun01", "nyd_dun02", "manuk", "man_fild02", "man_in01", "splendide", "spl_fild01", "spl_in01", "spl_in02", "bat_c01", "bat_c02", "bat_c03", "moc_para01", "job3_arch01", "job3_arch02", "job3_arch03", "job3_guil01", "job3_guil02", "job3_guil03", "job3_rang01", "job3_rang02", "job3_rune01", "job3_rune02", "job3_rune03", "job3_war01", "job3_war02", "jupe_core2", "brasilis", "bra_in01", "bra_fild01", "bra_dun01", "bra_dun02", "dicastes01", "dicastes02", "dic_in01", "dic_fild01", "dic_fild02", "dic_dun01", "dic_dun02", "job3_gen01", "s_atelier", "job3_sha01", "//evt_zombie", "//evt_coke", "//ac_sl_area", "//ac_cl_hall", "//ac_cl_room", "//jp_s_dun11", "mora", "bif_fild01", "bif_fild02", "1@mist", "dewata", "dew_in01", "dew_fild01", "dew_dun01", "dew_dun02", "que_house_s", "malangdo", "mal_in01", "mal_in02", "mal_dun01", "1@pump", "2@pump", "1@cash", "iz_dun05", "evt_mobroom", "alde_tt03", "dic_dun03", "//mjolnir_04_1", "1@lhz", "lhz_dun04", "que_lhz", "evt_swar_b", "evt_swar_r", "evt_swar_s", "evt_swar_t", "gld2_ald", "gld2_gef", "gld2_pay", "gld2_prt", "gld_dun01_2", "gld_dun02_2", "gld_dun03_2", "gld_dun04_2", "malaya", "job_ko", "ma_scene01", "1@ma_b", "1@ma_c", "1@ma_h", "ma_in01", "ma_dun01", "ma_fild01", "ma_fild02", "ma_zif01", "ma_zif02", "ma_zif03", "ma_zif04", "ma_zif05", "ma_zif06", "ma_zif07", "ma_zif08", "ma_zif09", "new_event", "eclage", "ecl_fild01", "ecl_tdun01", "ecl_tdun02", "ecl_tdun03", "ecl_tdun04", "que_avan01", "1@ecl", "ecl_in01", "ecl_in02", "ecl_in03", "ecl_in04", "ecl_hub01", "moc_prydn1", "moc_prydn2", "iz_ac01", "iz_ac02", "treasure_n1", "treasure_n2", "iz_int", "iz_ng01", "iz_int01", "iz_int02", "iz_int03", "iz_int04", "iz_ac01_a", "iz_ac02_a", "iz_ac01_b", "iz_ac02_b", "iz_ac01_c", "iz_ac02_c", "iz_ac01_d", "iz_ac02_d", "te_prtcas01", "te_prtcas02", "te_prtcas03", "te_prtcas04", "te_prtcas05", "te_aldecas1", "te_aldecas2", "te_aldecas3", "te_aldecas4", "te_aldecas5", "prt_fild08a", "prt_fild08b", "prt_fild08c", "prt_fild08d", "izlude_a", "izlude_b", "izlude_c", "izlude_d", "te_prt_gld", "te_alde_gld", "teg_dun01", "teg_dun02", "1@gl_k", "2@gl_k", "gl_chyard_", "gl_cas02_", "evt_bomb", "1@def01", "1@def02", "1@def03", "1@gef", "1@face", "1@sara", "1@gef_in", "dali", "dali02", "1@ge_st", "1@spa", "1@tnm1", "1@tnm2", "1@tnm3", "1@dth1", "1@dth2", "1@dth3", "1@eom", "1@jtb", "1@rev", "1@xm_d", "moro_cav", "moro_vol", "silk_lair", "c_tower2_", "c_tower3_", "1@mcd", "ver_eju", "ver_tunn", "verus03", "verus04", "job_gun", "1@air1", "1@air2", "1@glast", "lhz_dun_n", "lhz_d_n2", "1@gl_kh", "2@gl_kh", "1@lab", "1@uns", "un_bk_q", "un_bunker", "un_myst", "verus01", "verus02", "paramk", "1@infi", "1@ffp", "1@mir", "2@mir", "1@sthb", "1@sthc", "1@sthd", "prt_cas", "prt_cas_q", "prt_prison", "prt_lib", "prt_lib_q", "prt_q", "prt_pri00", "int_land", "int_land01", "int_land02", "int_land03", "int_land04", "lasagna", "lasa_fild01", "lasa_fild02", "lasa_dun01", "lasa_dun02", "lasa_dun03", "conch_in", "lasa_in01", "lasa_dun_q", "1@pop1", "1@pop2", "1@pop3", "1@slw", "1@swat", "que_swat", "slabw01", "rebel_in", "1@md_gef", "1@md_pay", "har_in01", "harboro1", "harboro2", "rockmi1", "rockmi2", "rockrdg1", "rockrdg2", "1@gl_k2", "2@gl_k2", "1@xm_d2", "pay_d03_i", "gef_d01_i", "ice_d03_i", "1@tre", "1@begi", "tur_d03_i", "tur_d04_i", "1@crd", "ordeal_a00", "ordeal_a02", "pprontera", "niflxmas", "sch_lab", "nakhyang", "lasa_sea", "1@drdo", "x_lhz", "x_prt", "x_ra", "prt_evt_in", "vis_h01", "vis_h02", "vis_h03", "vis_h04", "ein_d02_i", "com_d02_i", "1@soul", "star_frst", "star_in", "2009rwc_01", "2009rwc_02", "2009rwc_03", "2009rwc_04", "2009rwc_05", "2009rwc_06", "2009rwc_07", "2009rwc_08", "2009rwc_f01", "2012rwc_01", "2012rwc_02", "2012rwc_03", "2012rwc_04", "2012rwc_05", "2012rwc_06", "2012rwc_07", "2012rwc_08"; .map_size = getarraysize(.maps$); freeloop true; for(;.@i < .map_size;.@i++) { if(getmapusers(.maps$[.@i]) >= 0) { if(!getmapflag(.maps$[.@i],mf_nowarpto)) continue; } deletearray .maps$[.@i],1; .@i--; .map_size--; } freeloop false; monster .maps$[rand(.map_size)],0,0,"--ja--",2950,1,"Rand_Monster::OnSpawn"; end; }
  11. Change // Checks if the player can change to third class. // Note: This does not include the level checks. function Can_Change_Third { // To change to third class you either need to be: // * Second Class // * Transcendent Second Class // * Baby Second Class if( !.ThirdClass ) return false; // Third job change disabled if( !(eaclass()&EAJL_2) ) return false; // Not second Class if( eaclass()&EAJL_THIRD ) return false; // Already Third Class if( roclass(eaclass()|EAJL_THIRD) < 0 ) return false; // Job has no third Class if( (eaclass()&EAJ_UPPERMASK) == EAJ_SUPER_NOVICE ) return false; // Exp. Super Novice equals 3rd Cls, but has it's own case if( Is_Baby() && (!.BabyClass || !.BabyThird) ) return false; // No Baby (Third) change allowed return true; } to: // Checks if the player can change to third class. // Note: This does not include the level checks. function Can_Change_Third { // To change to third class you either need to be: // * Second Class // * Transcendent Second Class // * Baby Second Class if( !.ThirdClass ) return false; // Third job change disabled if( !(eaclass()&EAJL_2) ) return false; // Not second Class if( eaclass()&EAJL_THIRD ) return false; // Already Third Class if( (eaclass()&EAJ_BASEMASK) == EAJ_TAEKWON ) return false; // No Star Emperor or Soul Reaper. if( roclass(eaclass()|EAJL_THIRD) < 0 ) return false; // Job has no third Class if( (eaclass()&EAJ_UPPERMASK) == EAJ_SUPER_NOVICE ) return false; // Exp. Super Novice equals 3rd Cls, but has it's own case if( Is_Baby() && (!.BabyClass || !.BabyThird) ) return false; // No Baby (Third) change allowed return true; }
  12. n0tttt

    @charinfo

    script_constants.hpp below: /* parameters */
  13. Not possible to detect them as of now by scripting (@commands show them well though), you'd have to add them and their descriptions manually. - script CCommand -1,{ OnCommand: if(!.@atcmd_numparameters) { message strcharinfo(0),"Use @ccommands options to check the options."; } else { setarray .@options$[0],"options","bg","market"; .@str$ = strtolower(.@atcmd_parameters$[0]); .@command = inarray(.@options$,.@str$); switch(.@command) { case 1: warp "bg",0,0; break; case 2: warp "market",0,0; break; default: message strcharinfo(0),"Avaiaible commands:"; message strcharinfo(0),"@market: warps you to the Market."; message strcharinfo(0),"@bg: warps you to the BattleGrounds arena."; break; } } end; OnInit: bindatcmd "ccommand","CCommand::OnCommand"; end; }
  14. - script Tool Dealer::Tool Dealer 900,{ mes "What do you like to buy?"; .@s = select( "^FF0000~~Sell^000000","Consumable", "Miscellaneous","Arrow/Ammunition","^009900Taming Pet^000000","^009900Pet Armor^000000", "Nothing" ); if(.@s < 7) close2; switch(.@s) { case 1: callshop "sell",2; end; case 2: callshop "Consumable",1; end; case 3: callshop "Miscellaneous",1; end; case 4: callshop "Arrow/Ammunition",1; end; case 5: callshop "TamingPet",1; end; case 6: callshop "Pet Armor",1; end; case 7: mes "Okay, have a nice day"; close; } } - shop Tool Dealer#shop::Consumable -1,611:-1,1750:-1,501:-1,502:-1,503:-1,504:-1,506:-1,568:-1,533:-1,645:-1,656:-1,657:-1,601:-1,602:-1,1065:-1,610:-1 - shop Tool Dealer#shop::Miscellaneous -1,713:-1,717:-1,716:-1,715:3000,12020:-1,523:-1,993:-1,992:-1,991:-1,990:-1,12042:25000,12057:25000,12052:25000,12047:25000,12062:25000,12067:25000 - shop Tool Dealer#shop::Arrow/Ammunition -1,1750:-1,1751:-1,1752:-1,1753:-1,1754:-1,1755:-1,1756:-1,1772:-1,1757:-1,1767:-1,13200:-1,13201:-1,13202:-1,13203:-1,13207:-1,13204:-1,13250:-1,13251:-1,13252:-1,13253:-1,13254:-1 - shop sell -1,512:-1 - shop Tool Dealer#shop::TamingPet -1,643:-1,639:100000,621:100000,642:100000,12373:100000,12365:100000,12340:100000,641:100000,12361:100000,630:100000,623:100000,632:100000,12363:100000,660:100000,12366:100000,12370:100000,14572:100000,12374:100000,12367:100000,626:100000,637:100000,620:100000,635:100000,622:100000,624:100000,640:100000,638:100000,629:100000,661:100000,627:100000,633:100000,634:100000,619:100000,14574:100000,12359:100000,628:100000 - shop Tool Dealer#shop::Pet Armor -1,10013:-1,10017:500000,10010:500000,10037:500000,10024:500000,10016:500000,10023:500000,10015:500000,10025:500000,10038:500000,10029:500000,10034:500000,10018:500000,10002:500000,10004:500000,10027:500000,10008:500000,10006:500000,10019:500000,10031:500000,10014:-1,10007:500000,10001:500000,10011:500000,10012:500000,10003:500000,10005:500000,10009:500000 prontera,154,196,5 duplicate(Tool Dealer) Tool Dealer#pront 900 guild_base,49,375,4 duplicate(Tool Dealer) Barman#guildbase1 61 guild_base,49,241,4 duplicate(Tool Dealer) Barman#guildbase2 61 guild_base,49,105,4 duplicate(Tool Dealer) Barman#guildbase3 61 guild_base,171,105,4 duplicate(Tool Dealer) Barman#guildbase4 61 guild_base,171,241,4 duplicate(Tool Dealer) Barman#guildbase5 61 guild_base,171,375,4 duplicate(Tool Dealer) Barman#guildbase6 61 guild_base,289,375,4 duplicate(Tool Dealer) Barman#guildbase7 61 guild_base,287,241,4 duplicate(Tool Dealer) Barman#guildbase8 61 guild_base,287,105,4 duplicate(Tool Dealer) Barman#guildbase9 61
  15. n0tttt

    @charinfo

    If this works then it just lacks all the bonuses and resistances and things, but that's really something, because there're so many of them - script Char_Info -1,{ OnCommand: if(!.@atcmd_numparameters) { message strcharinfo(0),"Usage: @charinfo <player>"; } else { .@player$ = implode(.@atcmd_parameters$," "); .@aid = getcharid(3,.@player$); .@cid = getcharid(0,.@player$); if(isloggedin(.@aid,.@cid)) { .@blvl = readparam(BaseLevel,.@cid); .@jlvl = readparam(JobLevel,.@cid); .@def = readparam(bDef,.@cid); .@aspd = readparam(bAspd,.@cid); .@matk = readparam(bMatk,.@cid); .@atk = readparam(bAtk,.@cid); .@hit = readparam(bHit,.@cid); .@flee = readparam(bFlee,.@cid); message strcharinfo(0),"Character level: "+.@blvl+"/"+.@jlvl; message strcharinfo(0),"Def: "+.@def; message strcharinfo(0),"ASPD: "+.@aspd; message strcharinfo(0),"MATK: "+.@matk; message strcharinfo(0),"ATK: "+.@atk; message strcharinfo(0),"HIT: "+.@hit; message strcharinfo(0),"Flee: "+.@flee; } else { message strcharinfo(0),"Character not found."; } } end; OnInit: bindatcmd "charinfo","Char_Info::OnCommand",60; end; }
  16. Does your mapserver tells you it loaded x entries from import/skill_nocast_db? - script Duel_Death -1,{ OnCommand: if(.duel) { message strcharinfo(0),"There is a duel going on right now. Wait for it to finish."; } else if(.duel_delay > gettimetick(2)) { message strcharinfo(0),"There's a global delay between duels. You have to wait "+Time2Str(.duel_delay)+"."; } else if(@wait_duelaid) { message strcharinfo(0),"You're already waiting for a confirmation. Relog to cancel."; } else { set .@player$,strcharinfo(0); set .@oid,getcharid(3); set .@enemy$,implode(.@atcmd_parameters$," "); set .@aid,getcharid(3,.@enemy$); set .@cid,getcharid(0,.@enemy$); if(!.@aid) { message strcharinfo(0),"That character is not online."; } else if(getvar(@duel,.@cid)) { message strcharinfo(0),"That character is already in a duel."; } else if(.@oid == .@aid) { message strcharinfo(0),"You can't duel yourself."; } else { set @duel_creator,1; set @wait_duelaid,.@aid; set @wait_duelaid,.@cid; message strcharinfo(0),"Proposition sent. Wait for him/her to accept or reject."; attachrid .@aid; set @wait_duelaid,.@oid; set @wait_duelcid,getcharid(0,.@player$); message strcharinfo(0),.@player$+" wants to have a Death Duel with you. Use @acceptdd to accept it or @rejectdd to reject it."; } } end; OnAccept: if(@duel) { message strcharinfo(0),"You're already in a duel."; } else if(@duel_creator) { message strcharinfo(0),"You are the creater of the duel. Wait for the other player's answer."; } else if(@wait_duelaid) { set .@oid,getcharid(3); set .@cid,getcharid(0); if(isloggedin(@wait_duelaid,@wait_duelcid)) { // Player 2. mes "Are you really sure about this duel? ^ff0000Your character will be deleted^000000"; if(prompt("No.","Yes.") == 2) { message strcharinfo(0),"You accepted the duel. Prepare yourself."; close2; attachrid @wait_duelaid; // Player 1. mes "Are you really sure about this duel? ^ff0000Your character will be deleted^000000"; if(prompt("Não","Sim") == 2) { if(isloggedin(.@oid,.@cid)) { if(!.duel) { message strcharinfo(0),rid2name(.@oid)+" has accepted the duel."; announce strcharinfo(0)+" e "+rid2name(.@oid)+" gonna make a Death Duel where the loser get's his character deleted!",bc_all|bc_blue; announce "If you want to spectate use @spectatedd",bc_all|bc_blue; set .duel,true; set .cancel,false; removemapflag .duel_map$,mf_pvp; removemapflag .duel_map$,mf_pvp_nocalcrank; setmapflag .duel_map$,mf_restricted,9; set .@first_id,getcharid(3); explode .@xy$,.duel_xy$,","; set .@r,rand(2); set @duel,.@oid; warp .duel_map$,atoi(.@xy$[2*.@r]),atoi(.@xy$[2*.@r + 1]); setoption 0x40,0; pcblockmove .@first_id,1; message strcharinfo(0),"You will not be able to move until the duel starts."; attachrid .@oid; set @duel,.@first_id; set .@r,!.@r; warp .duel_map$,atoi(.@xy$[2*.@r]),atoi(.@xy$[2*.@r + 1]); setoption 0x40,0; pcblockmove .@oid,1; message strcharinfo(0),"You will not be able to move until the duel starts."; detachrid; set .@i,30; while(.@i > 0 && !.cancel) { if(!(.@i % 10) || .@i < 6) announce .@i+" seconds for the duel between "+rid2name(.@first_id)+" vs "+rid2name(.@oid)+"!",bc_all|bc_blue; sleep 1000; set .@i,.@i - 1; } pcblockmove .@first_id,0; pcblockmove .@oid,0; removemapflag .duel_map$,mf_restricted,9; if(.@i || .cancel) { announce "The Death Duel has been cancelled!",bc_all|bc_blue; } else { announce "The Death Duel has just started!",bc_all|bc_blue; setmapflag .duel_map$,mf_pvp; setmapflag .duel_map$,mf_pvp_nocalcrank; set .@i,0; while(.@i < .time && !.cancel && .duel) { sleep 5000; set .@i,.@i + 5; } if(.@i >= .time) announce "Death Duel time is over. There was no winner.",bc_all|bc_blue; } sleep 1000; if(.logout && .duel) { announce "One of the participants logged out.",bc_all|bc_blue; set .logout,false; } if(.cancel) set .cancel,false; set .duel,false; removemapflag .duel_map$,mf_pvp; removemapflag .duel_map$,mf_pvp_nocalcrank; addrid 5,0,.duel_map$; setoption 0x40,0; if(!@duel) { atcommand "@rmvperm disable_pvp"; } else { set @duel,0; set @duel_creator,0; set @wait_duelaid,0; set @wait_duelcid,0; } set .@i,5; while(.@i) { message strcharinfo(0),.@i+" second"+((.@i > 1)? "s" : "")+" to warp you out."; sleep2 1000; set .@i,.@i - 1; } warp "prontera",156,161; pcblockskill getcharid(3),0; end; } else { message strcharinfo(0),"I'm sorry but a duel started a few moments ago."; message strcharinfo(0,.@cid),"I'm sorry but a duel started a few moments ago."; end; } } else { message strcharinfo(0),"The other player disconnected."; } } else { message strcharinfo(0,.@cid),"The challenger changed his mind. The Death Duel is cancelled."; } } else { message strcharinfo(0,@wait_duelcid),strcharinfo(0)+" has rejected the duel."; } set .duel,false; set .cancel,false; if(playerattached()) { message strcharinfo(0),"The duel has been cancelled."; if(isloggedin(@wait_duelaid,@wait_duelcid)) { message strcharinfo(0,@wait_duelcid),"The duel has been cancelled."; set @duel_creator,0,@wait_duelcid; set @wait_duelaid,0,@wait_duelcid; set @wait_duelcid,0,@wait_duelcid; set @duel,0,@wait_duelcid; } set @duel_creator,0; set @wait_duelaid,0; set @wait_duelcid,0; set @duel,0; close; } } else { message strcharinfo(0),"The character who challenged you is now offline."; set @wait_duelaid,0; set @wait_duelcid,0; } } else { message strcharinfo(0),"There is no death duel invite for you right now."; } end; OnReject: if(@duel) { message strcharinfo(0),"You're already in a duel."; } else if(@duel_creator) { message strcharinfo(0),"You have to wait for your opponent to choose."; } else if(@wait_duelaid) { message strcharinfo(0),"You rejected the duel."; if(isloggedin(@wait_duelaid,@wait_duelcid)) { message strcharinfo(0,@wait_duelcid),strcharinfo(0)+" has rejected the duel."; set .@id,@wait_duelaid; } set @wait_duelaid,0; set @wait_duelcid,0; if(.@id) { attachrid .@id; set @wait_duelaid,0; set @wait_duelcid,0; } set .cancel,true; awake "Duel_Death"; } else { message strcharinfo(0),"You haven't been challenged to a duel."; } end; OnSpectate: if(@duel) { message strcharinfo(0),"You're part of the duel."; } else if(.duel) { if(strcharinfo(3) == .duel_map$) { message strcharinfo(0),"You're already in the map."; } else { setoption 0x40,1; atcommand "@addperm disable_pvp"; pcblockskill getcharid(3),1; warp .duel_map$,0,0; } } else { message strcharinfo(0),"There isn't a duel right now."; } end; OnFixDuel: set .duel,false; set .cancel,false; set .logout,false; set .duel_delay,false; message strcharinfo(0),"Every variable has been cleared successfully."; addrid 0; set @duel,0; set @wait_duelaid,0; set @wait_duelcid,0; set @duel_creator,0; end; OnPCKillEvent: if(@duel && killedrid == @duel) { set .duel_delay,gettimetick(2) + 5*60; set .duel,false; set .@oid,getcharid(3); announce strcharinfo(0)+" has won a Death Duel against "+rid2name(@duel)+"!",bc_all|bc_blue; announce rid2name(@duel)+" was deleted.",bc_all|bc_blue; attachrid @duel; setarray .@char_delete$[0],"bonus_script","char","cart_inventory","elemental","friends","global_reg_value","guild","guild_member","homunculus","hotkey","inventory","memo","mercenary","mercenary_owner","pet","quest","sc_data","skill","skillcooldown"; set .@deadplayer,getcharid(0); message strcharinfo(0),"Game Over"; atcommand "@kick "+strcharinfo(0); set .@j, getarraysize( .@char_delete$ ); for (.@i = 0; .@i < .@j; .@i++) { query_sql("DELETE FROM `"+ .@char_delete$[.@i] +"` WHERE `char_id` = '"+ .@deadplayer +"'"); } query_sql "DELETE FROM `party` WHERE `leader_char` = '"+.@deadplayer+"'"; } end; OnPCLogoutEvent: if(@wait_duelaid) { message strcharinfo(0,@wait_duelcid),"The other player disconnected."; set @wait_duelaid,0,@wait_duelcid; set @creator_duel,0,@wait_duelcid; set @wait_duelcid,0,@wait_duelcid; } if(@duel) { set .cancel,true; set .logout,true; awake "Duel_Death"; } end; OnPCLoginEvent: if(checkoption(0x40) && getgmlevel() < 60) setoption 0x40,0; end; OnInit: // Map set .duel_map$,"deathduel"; // Coordinates set .duel_xy$, "95,100,"+ // x,y first player "103,100"; // x,y second player bindatcmd "deathduel","Duel_Death::OnCommand"; bindatcmd "acceptdd","Duel_Death::OnAccept"; bindatcmd "rejectdd","Duel_Death::OnReject"; bindatcmd "spectatedd","Duel_Death::OnSpectate"; bindatcmd "fixduel","Duel_Death::OnFix",60; // Max duration of a duel (seconds). set .time,20; end; } deathduel mapflag pvp deathduel mapflag pvp_nocalcrank deathduel mapflag noreturn deathduel mapflag nowarp deathduel mapflag nocommand 99 deathduel mapflag nowarpto deathduel mapflag nosave SavePoint deathduel mapflag nomemo deathduel mapflag notrade deathduel mapflag nodrop deathduel mapflag nobranch deathduel mapflag nochat deathduel mapflag novending deathduel mapflag restricted 9
  17. Oh, I get it now. That map had its own mapflags beforehand, and it has the default pvp restricted one. You could duplicate it with this: resnametable is in the data folder. map_index in db/import and maps_athena.conf in conf.
  18. Sorry. .@str$ = strtolower(.@atcmd_parameter$[0]); Change to: .@str$ = strtolower(.@atcmd_parameters$[0]);
  19. Weird. By default GMs don't have that permission. What does @mapinfo show?
  20. I don't know if I understood very well. - script CCommand -1,{ OnCommand: if(!.@atcmd_numparameters) { message strcharinfo(0),"Use @ccommands options to check the options."; } else { setarray .@options$[0],"options","bg","market"; .@str$ = strtolower(.@atcmd_parameter$[0]); .@command = inarray(.@options$,.@str$); switch(.@command) { case 1: warp "bg",0,0; break; case 2: warp "market",0,0; break; default: .@mes$ = implode(.@options$,", "); message strcharinfo(0),"Avaiaible commands: "+.@mes$; break; } } end; OnInit: bindatcmd "ccommand","CCommand::OnCommand"; end; }
  21. db/import/skill_nocast_db.txt Add: //---------------------------------------------------------------------------- // Zone 9 - Death Duel //---------------------------------------------------------------------------- 150,8192 //TF_BACKSLIDING 426,8192 //TK_HIGHJUMP And the script: - script Duel_Death -1,{ OnCommand: if(.duel) { message strcharinfo(0),"There is a duel going on right now. Wait for it to finish."; } else if(.duel_delay > gettimetick(2)) { message strcharinfo(0),"There's a global delay between duels. You have to wait "+Time2Str(.duel_delay)+"."; } else if(@wait_duelaid) { message strcharinfo(0),"You're already waiting for a confirmation. Relog to cancel."; } else { set .@player$,strcharinfo(0); set .@oid,getcharid(3); set .@enemy$,implode(.@atcmd_parameters$," "); set .@aid,getcharid(3,.@enemy$); set .@cid,getcharid(0,.@enemy$); if(!.@aid) { message strcharinfo(0),"That character is not online."; } else if(getvar(@duel,.@cid)) { message strcharinfo(0),"That character is already in a duel."; } else if(.@oid == .@aid) { message strcharinfo(0),"You can't duel yourself."; } else { set @duel_creator,1; set @wait_duelaid,.@aid; set @wait_duelaid,.@cid; message strcharinfo(0),"Proposition sent. Wait for him/her to accept or reject."; attachrid .@aid; set @wait_duelaid,.@oid; set @wait_duelcid,getcharid(0,.@player$); message strcharinfo(0),.@player$+" wants to have a Death Duel with you. Use @acceptdd to accept it or @rejectdd to reject it."; } } end; OnAccept: if(@duel) { message strcharinfo(0),"You're already in a duel."; } else if(@duel_creator) { message strcharinfo(0),"You are the creater of the duel. Wait for the other player's answer."; } else if(@wait_duelaid) { set .@oid,getcharid(3); set .@cid,getcharid(0); if(isloggedin(@wait_duelaid,@wait_duelcid)) { // Player 2. mes "Are you really sure about this duel? ^ff0000Your character will be deleted^000000"; if(prompt("No.","Yes.") == 2) { message strcharinfo(0),"You accepted the duel. Prepare yourself."; close2; attachrid @wait_duelaid; // Player 1. mes "Are you really sure about this duel? ^ff0000Your character will be deleted^000000"; if(prompt("Não","Sim") == 2) { if(isloggedin(.@oid,.@cid)) { if(!.duel) { message strcharinfo(0),rid2name(.@oid)+" has accepted the duel."; announce strcharinfo(0)+" e "+rid2name(.@oid)+" gonna make a Death Duel where the loser get's his character deleted!",bc_all|bc_blue; announce "If you want to spectate use @spectatedd",bc_all|bc_blue; set .duel,true; set .cancel,false; removemapflag .duel_map$,mf_pvp; removemapflag .duel_map$,mf_pvp_nocalcrank; setmapflag .duel_map$,mf_restricted,9; set .@first_id,getcharid(3); explode .@xy$,.duel_xy$,","; set .@r,rand(2); set @duel,.@oid; warp .duel_map$,atoi(.@xy$[2*.@r]),atoi(.@xy$[2*.@r + 1]); setoption 0x40,0; pcblockmove .@first_id,1; message strcharinfo(0),"You will not be able to move until the duel starts."; attachrid .@oid; set @duel,.@first_id; set .@r,!.@r; warp .duel_map$,atoi(.@xy$[2*.@r]),atoi(.@xy$[2*.@r + 1]); setoption 0x40,0; pcblockmove .@oid,1; message strcharinfo(0),"You will not be able to move until the duel starts."; detachrid; set .@i,30; while(.@i > 0 && !.cancel) { if(!(.@i % 10) || .@i < 6) announce .@i+" seconds for the duel between "+rid2name(.@first_id)+" vs "+rid2name(.@oid)+"!",bc_all|bc_blue; sleep 1000; set .@i,.@i - 1; } pcblockmove .@first_id,0; pcblockmove .@oid,0; removemapflag .duel_map$,mf_restricted,9; if(.@i || .cancel) { announce "The Death Duel has been cancelled!",bc_all|bc_blue; } else { announce "The Death Duel has just started!",bc_all|bc_blue; setmapflag .duel_map$,mf_pvp; setmapflag .duel_map$,mf_pvp_nocalcrank; set .@i,0; while(.@i < .time && !.cancel && .duel) { sleep 5000; set .@i,.@i + 5; } if(.@i >= .time) announce "Death Duel time is over. There was no winner.",bc_all|bc_blue; } sleep 1000; if(.logout && .duel) { announce "One of the participants logged out.",bc_all|bc_blue; set .logout,false; } if(.cancel) set .cancel,false; set .duel,false; removemapflag .duel_map$,mf_pvp; removemapflag .duel_map$,mf_pvp_nocalcrank; addrid 5,0,.duel_map$; setoption 0x40,0; if(!@duel) { atcommand "@rmvperm disable_pvp"; } else { set @duel,0; set @duel_creator,0; set @wait_duelaid,0; set @wait_duelcid,0; } set .@i,5; while(.@i) { message strcharinfo(0),.@i+" second"+((.@i > 1)? "s" : "")+" to warp you out."; sleep2 1000; set .@i,.@i - 1; } warp "prontera",156,161; pcblockskill getcharid(3),0; end; } else { message strcharinfo(0),"I'm sorry but a duel started a few moments ago."; message strcharinfo(0,.@cid),"I'm sorry but a duel started a few moments ago."; end; } } else { message strcharinfo(0),"The other player disconnected."; } } else { message strcharinfo(0,.@cid),"The challenger changed his mind. The Death Duel is cancelled."; } } else { message strcharinfo(0,@wait_duelcid),strcharinfo(0)+" has rejected the duel."; } set .duel,false; set .cancel,false; if(playerattached()) { message strcharinfo(0),"The duel has been cancelled."; if(isloggedin(@wait_duelaid,@wait_duelcid)) { message strcharinfo(0,@wait_duelcid),"The duel has been cancelled."; set @duel_creator,0,@wait_duelcid; set @wait_duelaid,0,@wait_duelcid; set @wait_duelcid,0,@wait_duelcid; set @duel,0,@wait_duelcid; } set @duel_creator,0; set @wait_duelaid,0; set @wait_duelcid,0; set @duel,0; close; } } else { message strcharinfo(0),"The character who challenged you is now offline."; set @wait_duelaid,0; set @wait_duelcid,0; } } else { message strcharinfo(0),"There is no death duel invite for you right now."; } end; OnReject: if(@duel) { message strcharinfo(0),"You're already in a duel."; } else if(@duel_creator) { message strcharinfo(0),"You have to wait for your opponent to choose."; } else if(@wait_duelaid) { message strcharinfo(0),"You rejected the duel."; if(isloggedin(@wait_duelaid,@wait_duelcid)) { message strcharinfo(0,@wait_duelcid),strcharinfo(0)+" has rejected the duel."; set .@id,@wait_duelaid; } set @wait_duelaid,0; set @wait_duelcid,0; if(.@id) { attachrid .@id; set @wait_duelaid,0; set @wait_duelcid,0; } set .cancel,true; awake "Duel_Death"; } else { message strcharinfo(0),"You haven't been challenged to a duel."; } end; OnSpectate: if(@duel) { message strcharinfo(0),"You're part of the duel."; } else if(.duel) { if(strcharinfo(3) == .duel_map$) { message strcharinfo(0),"You're already in the map."; } else { setoption 0x40,1; atcommand "@addperm disable_pvp"; pcblockskill getcharid(3),1; warp .duel_map$,0,0; } } else { message strcharinfo(0),"There isn't a duel right now."; } end; OnFixDuel: set .duel,false; set .cancel,false; set .logout,false; set .duel_delay,false; message strcharinfo(0),"Every variable has been cleared successfully."; addrid 0; set @duel,0; set @wait_duelaid,0; set @wait_duelcid,0; set @duel_creator,0; end; OnPCKillEvent: if(@duel && killedrid == @duel) { set .duel_delay,gettimetick(2) + 5*60; set .duel,false; set .@oid,getcharid(3); announce strcharinfo(0)+" has won a Death Duel against "+rid2name(@duel)+"!",bc_all|bc_blue; announce rid2name(@duel)+" was deleted.",bc_all|bc_blue; attachrid @duel; setarray .@char_delete$[0],"bonus_script","char","cart_inventory","elemental","friends","global_reg_value","guild","guild_member","homunculus","hotkey","inventory","memo","mercenary","mercenary_owner","pet","quest","sc_data","skill","skillcooldown"; set .@deadplayer,getcharid(0); message strcharinfo(0),"Game Over"; atcommand "@kick "+strcharinfo(0); set .@j, getarraysize( .@char_delete$ ); for (.@i = 0; .@i < .@j; .@i++) { query_sql("DELETE FROM `"+ .@char_delete$[.@i] +"` WHERE `char_id` = '"+ .@deadplayer +"'"); } query_sql "DELETE FROM `party` WHERE `leader_char` = '"+.@deadplayer+"'"; } end; OnPCLogoutEvent: if(@wait_duelaid) { message strcharinfo(0,@wait_duelcid),"The other player disconnected."; set @wait_duelaid,0,@wait_duelcid; set @creator_duel,0,@wait_duelcid; set @wait_duelcid,0,@wait_duelcid; } if(@duel) { set .cancel,true; set .logout,true; awake "Duel_Death"; } end; OnPCLoginEvent: if(checkoption(0x40) && getgmlevel() < 60) setoption 0x40,0; end; OnInit: // Map set .duel_map$,"pvp_n_8-5"; // Coordinates set .duel_xy$, "95,100,"+ // x,y first player "103,100"; // x,y second player bindatcmd "deathduel","Duel_Death::OnCommand"; bindatcmd "acceptdd","Duel_Death::OnAccept"; bindatcmd "rejectdd","Duel_Death::OnReject"; bindatcmd "spectatedd","Duel_Death::OnSpectate"; bindatcmd "fixduel","Duel_Death::OnFix",60; // Max duration of a duel (seconds). set .time,20; end; } pvp_n_8-5 mapflag pvp pvp_n_8-5 mapflag pvp_nocalcrank pvp_n_8-5 mapflag noreturn pvp_n_8-5 mapflag nowarp pvp_n_8-5 mapflag nocommand 99 pvp_n_8-5 mapflag nowarpto pvp_n_8-5 mapflag nosave SavePoint pvp_n_8-5 mapflag nomemo pvp_n_8-5 mapflag notrade pvp_n_8-5 mapflag nodrop pvp_n_8-5 mapflag nobranch pvp_n_8-5 mapflag nochat pvp_n_8-5 mapflag novending
  22. - script Duel_Death -1,{ OnCommand: if(.duel) { message strcharinfo(0),"There is a duel going on right now. Wait for it to finish."; } else if(.duel_delay > gettimetick(2)) { message strcharinfo(0),"There's a global delay between duels. You have to wait "+Time2Str(.duel_delay)+"."; } else if(@wait_duelaid) { message strcharinfo(0),"You're already waiting for a confirmation. Relog to cancel."; } else { set .@player$,strcharinfo(0); set .@oid,getcharid(3); set .@enemy$,implode(.@atcmd_parameters$," "); set .@aid,getcharid(3,.@enemy$); set .@cid,getcharid(0,.@enemy$); if(!.@aid) { message strcharinfo(0),"That character is not online."; } else if(getvar(@duel,.@cid)) { message strcharinfo(0),"That character is already in a duel."; } else if(.@oid == .@aid) { message strcharinfo(0),"You can't duel yourself."; } else { set @duel_creator,1; set @wait_duelaid,.@aid; set @wait_duelaid,.@cid; message strcharinfo(0),"Proposition sent. Wait for him/her to accept or reject."; attachrid .@aid; set @wait_duelaid,.@oid; set @wait_duelcid,getcharid(0,.@player$); message strcharinfo(0),.@player$+" wants to have a Death Duel with you. Use @acceptdd to accept it or @rejectdd to reject it."; } } end; OnAccept: if(@duel) { message strcharinfo(0),"You're already in a duel."; } else if(@duel_creator) { message strcharinfo(0),"You are the creater of the duel. Wait for the other player's answer."; } else if(@wait_duelaid) { set .@oid,getcharid(3); set .@cid,getcharid(0); if(isloggedin(@wait_duelaid,@wait_duelcid)) { // Player 2. mes "Are you really sure about this duel? ^ff0000Your character will be deleted^000000"; if(prompt("No.","Yes.") == 2) { message strcharinfo(0),"You accepted the duel. Prepare yourself."; close2; attachrid @wait_duelaid; // Player 1. mes "Are you really sure about this duel? ^ff0000Your character will be deleted^000000"; if(prompt("Não","Sim") == 2) { if(isloggedin(.@oid,.@cid)) { if(!.duel) { message strcharinfo(0),rid2name(.@oid)+" has accepted the duel."; announce strcharinfo(0)+" e "+rid2name(.@oid)+" gonna make a Death Duel where the loser get's his character deleted!",bc_all|bc_blue; announce "If you want to spectate use @spectatedd",bc_all|bc_blue; set .duel,true; set .cancel,false; removemapflag .duel_map$,mf_pvp; removemapflag .duel_map$,mf_pvp_nocalcrank; set .@first_id,getcharid(3); explode .@xy$,.duel_xy$,","; set .@r,rand(2); set @duel,.@oid; warp .duel_map$,atoi(.@xy$[2*.@r]),atoi(.@xy$[2*.@r + 1]); setoption 0x40,0; pcblockmove .@first_id,1; message strcharinfo(0),"You will not be able to move until the duel starts."; attachrid .@oid; set @duel,.@first_id; set .@r,!.@r; warp .duel_map$,atoi(.@xy$[2*.@r]),atoi(.@xy$[2*.@r + 1]); setoption 0x40,0; pcblockmove .@oid,1; message strcharinfo(0),"You will not be able to move until the duel starts."; detachrid; set .@i,30; while(.@i > 0 && !.cancel) { if(!(.@i % 10) || .@i < 6) announce .@i+" seconds for the duel between "+rid2name(.@first_id)+" vs "+rid2name(.@oid)+"!",bc_all|bc_blue; sleep 1000; set .@i,.@i - 1; } pcblockmove .@first_id,0; pcblockmove .@oid,0; if(.@i || .cancel) { announce "The Death Duel has been cancelled!",bc_all|bc_blue; } else { announce "The Death Duel has just started!",bc_all|bc_blue; setmapflag .duel_map$,mf_pvp; setmapflag .duel_map$,mf_pvp_nocalcrank; set .@i,0; while(.@i < .time && !.cancel && .duel) { sleep 5000; set .@i,.@i + 5; } if(.@i >= .time) announce "Death Duel time is over. There was no winner.",bc_all|bc_blue; } sleep 1000; if(.logout && .duel) { announce "One of the participants logged out.",bc_all|bc_blue; set .logout,false; } if(.cancel) set .cancel,false; set .duel,false; removemapflag .duel_map$,mf_pvp; removemapflag .duel_map$,mf_pvp_nocalcrank; addrid 5,0,.duel_map$; setoption 0x40,0; if(!@duel) { atcommand "@rmvperm disable_pvp"; } else { set @duel,0; set @duel_creator,0; set @wait_duelaid,0; set @wait_duelcid,0; } set .@i,5; while(.@i) { message strcharinfo(0),.@i+" second"+((.@i > 1)? "s" : "")+" to warp you out."; sleep2 1000; set .@i,.@i - 1; } warp "prontera",156,161; pcblockskill getcharid(3),0; end; } else { message strcharinfo(0),"I'm sorry but a duel started a few moments ago."; message strcharinfo(0,.@cid),"I'm sorry but a duel started a few moments ago."; end; } } else { message strcharinfo(0),"The other player disconnected."; } } else { message strcharinfo(0,.@cid),"The challenger changed his mind. The Death Duel is cancelled."; } } else { message strcharinfo(0,@wait_duelcid),strcharinfo(0)+" has rejected the duel."; } set .duel,false; set .cancel,false; if(playerattached()) { message strcharinfo(0),"The duel has been cancelled."; if(isloggedin(@wait_duelaid,@wait_duelcid)) { message strcharinfo(0,@wait_duelcid),"The duel has been cancelled."; set @duel_creator,0,@wait_duelcid; set @wait_duelaid,0,@wait_duelcid; set @wait_duelcid,0,@wait_duelcid; set @duel,0,@wait_duelcid; } set @duel_creator,0; set @wait_duelaid,0; set @wait_duelcid,0; set @duel,0; close; } } else { message strcharinfo(0),"The character who challenged you is now offline."; set @wait_duelaid,0; set @wait_duelcid,0; } } else { message strcharinfo(0),"There is no death duel invite for you right now."; } end; OnReject: if(@duel) { message strcharinfo(0),"You're already in a duel."; } else if(@duel_creator) { message strcharinfo(0),"You have to wait for your opponent to choose."; } else if(@wait_duelaid) { message strcharinfo(0),"You rejected the duel."; if(isloggedin(@wait_duelaid,@wait_duelcid)) { message strcharinfo(0,@wait_duelcid),strcharinfo(0)+" has rejected the duel."; set .@id,@wait_duelaid; } set @wait_duelaid,0; set @wait_duelcid,0; if(.@id) { attachrid .@id; set @wait_duelaid,0; set @wait_duelcid,0; } set .cancel,true; awake "Duel_Death"; } else { message strcharinfo(0),"You haven't been challenged to a duel."; } end; OnSpectate: if(@duel) { message strcharinfo(0),"You're part of the duel."; } else if(.duel) { if(strcharinfo(3) == .duel_map$) { message strcharinfo(0),"You're already in the map."; } else { setoption 0x40,1; atcommand "@addperm disable_pvp"; pcblockskill getcharid(3),1; warp .duel_map$,0,0; } } else { message strcharinfo(0),"There isn't a duel right now."; } end; OnFixDuel: set .duel,false; set .cancel,false; set .logout,false; set .duel_delay,false; message strcharinfo(0),"Every variable has been cleared successfully."; addrid 0; set @duel,0; set @wait_duelaid,0; set @wait_duelcid,0; set @duel_creator,0; end; OnPCKillEvent: if(@duel && killedrid == @duel) { set .duel_delay,gettimetick(2) + 5*60; set .duel,false; set .@oid,getcharid(3); announce strcharinfo(0)+" has won a Death Duel against "+rid2name(@duel)+"!",bc_all|bc_blue; announce rid2name(@duel)+" was deleted.",bc_all|bc_blue; attachrid @duel; setarray .@char_delete$[0],"bonus_script","char","cart_inventory","elemental","friends","global_reg_value","guild","guild_member","homunculus","hotkey","inventory","memo","mercenary","mercenary_owner","pet","quest","sc_data","skill","skillcooldown"; set .@deadplayer,getcharid(0); message strcharinfo(0),"Game Over"; atcommand "@kick "+strcharinfo(0); set .@j, getarraysize( .@char_delete$ ); for (.@i = 0; .@i < .@j; .@i++) { query_sql("DELETE FROM `"+ .@char_delete$[.@i] +"` WHERE `char_id` = '"+ .@deadplayer +"'"); } query_sql "DELETE FROM `party` WHERE `leader_char` = '"+.@deadplayer+"'"; } end; OnPCLogoutEvent: if(@wait_duelaid) { message strcharinfo(0,@wait_duelcid),"The other player disconnected."; set @wait_duelaid,0,@wait_duelcid; set @creator_duel,0,@wait_duelcid; set @wait_duelcid,0,@wait_duelcid; } if(@duel) { set .cancel,true; set .logout,true; awake "Duel_Death"; } end; OnPCLoginEvent: if(checkoption(0x40) && getgmlevel() < 60) setoption 0x40,0; end; OnInit: // Map set .duel_map$,"pvp_n_8-5"; // Coordinates set .duel_xy$, "95,100,"+ // x,y first player "103,100"; // x,y second player bindatcmd "deathduel","Duel_Death::OnCommand"; bindatcmd "acceptdd","Duel_Death::OnAccept"; bindatcmd "rejectdd","Duel_Death::OnReject"; bindatcmd "spectatedd","Duel_Death::OnSpectate"; bindatcmd "fixduel","Duel_Death::OnFix",60; // Max duration of a duel (seconds). set .time,20; end; } pvp_n_8-5 mapflag pvp pvp_n_8-5 mapflag pvp_nocalcrank pvp_n_8-5 mapflag noreturn pvp_n_8-5 mapflag nowarp pvp_n_8-5 mapflag nocommand 99 pvp_n_8-5 mapflag nowarpto pvp_n_8-5 mapflag nosave SavePoint pvp_n_8-5 mapflag nomemo pvp_n_8-5 mapflag notrade pvp_n_8-5 mapflag nodrop pvp_n_8-5 mapflag nobranch pvp_n_8-5 mapflag nochat pvp_n_8-5 mapflag novending
  23. I changed the setlooks to changelooks. Tell me how it goes. https://pastebin.com/raw/uEyspaCt
  24. Second error is really weird, since I don't think I changed much, just added the checking of offline characters. Maybe is connected to the other one? Anyways I changed the message. Anyways I added a new command: @fixduel, only usable by GMs. It should help testing and also when the duel gets stuck in a "ghost duel" (it shouldn't happen anyways, but this should help). - script Duel_Death -1,{ OnCommand: if(.duel) { message strcharinfo(0),"There is a duel going on right now. Wait for it to finish."; } else if(.duel_delay > gettimetick(2)) { message strcharinfo(0),"There's a global delay between duels. You have to wait "+Time2Str(.duel_delay)+"."; } else if(@wait_duelaid) { message strcharinfo(0),"You're already waiting for a confirmation. Relog to cancel."; } else { set .@player$,strcharinfo(0); set .@oid,getcharid(3); set .@enemy$,implode(.@atcmd_parameters$," "); set .@aid,getcharid(3,.@enemy$); set .@cid,getcharid(0,.@enemy$); if(!.@aid) { message strcharinfo(0),"That character is not online."; } else if(getvar(@duel,.@cid)) { message strcharinfo(0),"That character is already in a duel."; } else if(.@oid == .@aid) { message strcharinfo(0),"You can't duel yourself."; } else { set @duel_creator,1; set @wait_duelaid,.@aid; set @wait_duelaid,.@cid; message strcharinfo(0),"Proposition sent. Wait for him/her to accept or reject."; attachrid .@aid; set @wait_duelaid,.@oid; set @wait_duelcid,getcharid(0,.@player$); message strcharinfo(0),.@player$+" wants to have a Death Duel with you. Use @acceptdd to accept it or @rejectdd to reject it."; } } end; OnAccept: if(@duel) { message strcharinfo(0),"You're already in a duel."; } else if(@duel_creator) { message strcharinfo(0),"You are the creater of the duel. Wait for the other player's answer."; } else if(@wait_duelaid) { set .@oid,getcharid(3); set .@cid,getcharid(0); if(isloggedin(@wait_duelaid,@wait_duelcid)) { // Player 2. mes "Are you really sure about this duel? ^ff0000Your character will be deleted^000000"; if(prompt("No.","Yes.") == 2) { message strcharinfo(0),"You accepted the duel. Prepare yourself."; close2; attachrid @wait_duelaid; // Player 1. mes "Are you really sure about this duel? ^ff0000Your character will be deleted^000000"; if(prompt("Não","Sim") == 2) { if(isloggedin(@wait_duelaid,@wait_duelcid)) { if(!.duel) { message strcharinfo(0),rid2name(.@oid)+" has accepted the duel."; announce strcharinfo(0)+" e "+rid2name(.@oid)+" gonna make a Death Duel where the loser get's his character deleted!",bc_all|bc_blue; announce "If you want to spectate use @spectatedd",bc_all|bc_blue; set .duel,true; set .cancel,false; removemapflag .duel_map$,mf_pvp; removemapflag .duel_map$,mf_pvp_nocalcrank; set .@first_id,getcharid(3); explode .@xy$,.duel_xy$,","; set .@r,rand(2); set @duel,.@oid; warp .duel_map$,atoi(.@xy$[2*.@r]),atoi(.@xy$[2*.@r + 1]); setoption 0x40,0; pcblockmove .@first_id,1; message strcharinfo(0),"You will not be able to move until the duel starts."; attachrid .@oid; set @duel,.@first_id; set .@r,!.@r; warp .duel_map$,atoi(.@xy$[2*.@r]),atoi(.@xy$[2*.@r + 1]); setoption 0x40,0; pcblockmove .@oid,1; message strcharinfo(0),"You will not be able to move until the duel starts."; detachrid; set .@i,30; while(.@i > 0 && !.cancel) { if(!(.@i % 10) || .@i < 6) announce .@i+" seconds for the duel between "+rid2name(.@first_id)+" vs "+rid2name(.@oid)+"!",bc_all|bc_blue; sleep 1000; set .@i,.@i - 1; } pcblockmove .@first_id,0; pcblockmove .@oid,0; if(.@i || .cancel) { announce "The Death Duel has been cancelled!",bc_all|bc_blue; } else { announce "The Death Duel has just started!",bc_all|bc_blue; setmapflag .duel_map$,mf_pvp; setmapflag .duel_map$,mf_pvp_nocalcrank; set .@i,0; while(.@i < .time && !.cancel && .duel) { sleep 5000; set .@i,.@i + 5; } if(.@i >= .time) announce "Death Duel time is over. There was no winner.",bc_all|bc_blue; } sleep 1000; if(.logout && .duel) { announce "One of the participants logged out.",bc_all|bc_blue; set .logout,false; } if(.cancel) set .cancel,false; set .duel,false; removemapflag .duel_map$,mf_pvp; removemapflag .duel_map$,mf_pvp_nocalcrank; addrid 5,0,.duel_map$; setoption 0x40,0; if(!@duel) { atcommand "@rmvperm disable_pvp"; } else { set @duel,0; set @duel_creator,0; set @wait_duelaid,0; set @wait_duelcid,0; } set .@i,5; while(.@i) { message strcharinfo(0),.@i+" second"+((.@i > 1)? "s" : "")+" to warp you out."; sleep2 1000; set .@i,.@i - 1; } warp "prontera",156,161; pcblockskill getcharid(3),0; end; } else { message strcharinfo(0),"I'm sorry but a duel started a few moments ago."; message strcharinfo(0,.@cid),"I'm sorry but a duel started a few moments ago."; end; } } else { message strcharinfo(0),"The other player disconnected."; } } else { message strcharinfo(0,.@cid),"The challenger changed his mind. The Death Duel is cancelled."; } } else { message strcharinfo(0,@wait_duelcid),strcharinfo(0)+" has rejected the duel."; } set .duel,false; set .cancel,false; if(playerattached()) { message strcharinfo(0),"The duel has been cancelled."; if(isloggedin(@wait_duelaid,@wait_duelcid)) { message strcharinfo(0,@wait_duelcid),"The duel has been cancelled."; set @duel_creator,0,@wait_duelcid; set @wait_duelaid,0,@wait_duelcid; set @wait_duelcid,0,@wait_duelcid; set @duel,0,@wait_duelcid; } set @duel_creator,0; set @wait_duelaid,0; set @wait_duelcid,0; set @duel,0; close; } } else { message strcharinfo(0),"The character who challenged you is now offline."; set @wait_duelaid,0; set @wait_duelcid,0; } } else { message strcharinfo(0),"There is no death duel invite for you right now."; } end; OnReject: if(@duel) { message strcharinfo(0),"You're already in a duel."; } else if(@duel_creator) { message strcharinfo(0),"You have to wait for your opponent to choose."; } else if(@wait_duelaid) { message strcharinfo(0),"You rejected the duel."; if(isloggedin(@wait_duelaid,@wait_duelcid)) { message strcharinfo(0,@wait_duelcid),strcharinfo(0)+" has rejected the duel."; set .@id,@wait_duelaid; } set @wait_duelaid,0; set @wait_duelcid,0; if(.@id) { attachrid .@id; set @wait_duelaid,0; set @wait_duelcid,0; } set .cancel,true; awake "Duel_Death"; } else { message strcharinfo(0),"You haven't been challenged to a duel."; } end; OnSpectate: if(@duel) { message strcharinfo(0),"You're part of the duel."; } else if(.duel) { if(strcharinfo(3) == .duel_map$) { message strcharinfo(0),"You're already in the map."; } else { setoption 0x40,1; atcommand "@addperm disable_pvp"; pcblockskill getcharid(3),1; warp .duel_map$,0,0; } } else { message strcharinfo(0),"There isn't a duel right now."; } end; OnFixDuel: set .duel,false; set .cancel,false; set .logout,false; set .duel_delay,false; message strcharinfo(0),"Every variable has been cleared successfully."; addrid 0; set @duel,0; set @wait_duelaid,0; set @wait_duelcid,0; set @duel_creator,0; end; OnPCKillEvent: if(@duel && killedrid == @duel) { set .duel_delay,gettimetick(2) + 5*60; set .duel,false; set .@oid,getcharid(3); announce strcharinfo(0)+" has won a Death Duel against "+rid2name(@duel)+"!",bc_all|bc_blue; announce rid2name(@duel)+" was deleted.",bc_all|bc_blue; attachrid @duel; setarray .@char_delete$[0],"bonus_script","char","cart_inventory","elemental","friends","global_reg_value","guild","guild_member","homunculus","hotkey","inventory","memo","mercenary","mercenary_owner","pet","quest","sc_data","skill","skillcooldown"; set .@deadplayer,getcharid(0); message strcharinfo(0),"Game Over"; atcommand "@kick "+strcharinfo(0); set .@j, getarraysize( .@char_delete$ ); for (.@i = 0; .@i < .@j; .@i++) { query_sql("DELETE FROM `"+ .@char_delete$[.@i] +"` WHERE `char_id` = '"+ .@deadplayer +"'"); } query_sql "DELETE FROM `party` WHERE `leader_char` = '"+.@deadplayer+"'"; } end; OnPCLogoutEvent: if(@wait_duelaid) { message strcharinfo(0,@wait_duelcid),"The other player disconnected."; set @wait_duelaid,0,@wait_duelcid; set @creator_duel,0,@wait_duelcid; set @wait_duelcid,0,@wait_duelcid; } if(@duel) { set .cancel,true; set .logout,true; awake "Duel_Death"; } end; OnPCLoginEvent: if(checkoption(0x40) && getgmlevel() < 60) setoption 0x40,0; end; OnInit: // Map set .duel_map$,"pvp_n_8-5"; // Coordinates set .duel_xy$, "95,100,"+ // x,y first player "103,100"; // x,y second player bindatcmd "deathduel","Duel_Death::OnCommand"; bindatcmd "acceptdd","Duel_Death::OnAccept"; bindatcmd "rejectdd","Duel_Death::OnReject"; bindatcmd "spectatedd","Duel_Death::OnSpectate"; bindatcmd "fixduel","Duel_Death::OnFixDuel",60; // Max duration of a duel (seconds). set .time,20; end; } pvp_n_8-5 mapflag pvp pvp_n_8-5 mapflag pvp_nocalcrank pvp_n_8-5 mapflag noreturn pvp_n_8-5 mapflag nowarp pvp_n_8-5 mapflag nocommand 99 pvp_n_8-5 mapflag nowarpto pvp_n_8-5 mapflag nosave SavePoint pvp_n_8-5 mapflag nomemo pvp_n_8-5 mapflag notrade pvp_n_8-5 mapflag nodrop pvp_n_8-5 mapflag nobranch pvp_n_8-5 mapflag nochat pvp_n_8-5 mapflag novending
  25. Done. I hope it turns out right. - script Duel_Death -1,{ OnCommand: if(.duel) { message strcharinfo(0),"There is a duel going on right now. Wait for it to finish."; } else if(.duel_delay > gettimetick(2)) { message strcharinfo(0),"There's a global delay between duels. You have to wait "+Time2Str(.duel_delay)+"."; } else if(@wait_duelaid) { message strcharinfo(0),"You're already waiting for a confirmation. Relog to cancel."; } else { set .@player$,strcharinfo(0); set .@oid,getcharid(3); set .@enemy$,implode(.@atcmd_parameters$," "); set .@aid,getcharid(3,.@enemy$); set .@cid,getcharid(0,.@enemy$); if(!.@aid) { message strcharinfo(0),"That character is not online."; } else if(getvar(@duel,.@cid)) { message strcharinfo(0),"That character is already in a duel."; } else if(.@oid == .@aid) { message strcharinfo(0),"You can't duel yourself."; } else { set @duel_creator,1; set @wait_duelaid,.@aid; set @wait_duelaid,.@cid; message strcharinfo(0),"Proposition sent. Wait for him/her to accept or reject."; attachrid .@aid; set @wait_duelaid,.@oid; set @wait_duelcid,getcharid(0,.@player$); message strcharinfo(0),.@player$+" wants to have a Death Duel with you. Use @acceptdd to accept it or @rejectdd to reject it."; } } end; OnAccept: if(@duel) { message strcharinfo(0),"You're already in a duel."; } else if(@duel_creator) { message strcharinfo(0),"You are the creater of the duel. Wait for the other player's answer."; } else if(@wait_duelaid) { set .@oid,getcharid(3); set .@cid,getcharid(0); if(isloggedin(@wait_duelaid,@wait_duelcid)) { // Player 2. mes "Are you really sure about this duel? ^ff0000Your character will be deleted^000000"; if(prompt("No.","Yes.") == 2) { message strcharinfo(0),"You accepted the duel. Prepare yourself."; close2; attachrid @wait_duelaid; // Player 1. mes "Are you really sure about this duel? ^ff0000Your character will be deleted^000000"; if(prompt("Não","Sim") == 2) { if(isloggedin(@wait_duelaid,@wait_duelcid)) { if(!.duel) { message strcharinfo(0),rid2name(.@oid)+" has accepted the duel."; announce strcharinfo(0)+" e "+rid2name(.@oid)+" gonna make a Death Duel where the loser get's his character deleted!",bc_all|bc_blue; announce "If you want to spectate use @spectatedd",bc_all|bc_blue; set .duel,true; set .cancel,false; removemapflag .duel_map$,mf_pvp; removemapflag .duel_map$,mf_pvp_nocalcrank; set .@first_id,getcharid(3); explode .@xy$,.duel_xy$,","; set .@r,rand(2); set @duel,.@oid; warp .duel_map$,atoi(.@xy$[2*.@r]),atoi(.@xy$[2*.@r + 1]); setoption 0x40,0; pcblockmove .@first_id,1; message strcharinfo(0),"You will not be able to move until the duel starts."; attachrid .@oid; set @duel,.@first_id; set .@r,!.@r; warp .duel_map$,atoi(.@xy$[2*.@r]),atoi(.@xy$[2*.@r + 1]); setoption 0x40,0; pcblockmove .@oid,1; message strcharinfo(0),"You will not be able to move until the duel starts."; detachrid; set .@i,30; while(.@i > 0 && !.cancel) { if(!(.@i % 10) || .@i < 6) announce .@i+" seconds for the duel between "+rid2name(.@first_id)+" vs "+rid2name(.@oid)+"!",bc_all|bc_blue; sleep 1000; set .@i,.@i - 1; } if(.@i || .cancel) { announce "The Death Duel has been cancelled!",bc_all|bc_blue; } else { announce "The Death Duel has just started!",bc_all|bc_blue; setmapflag .duel_map$,mf_pvp; setmapflag .duel_map$,mf_pvp_nocalcrank; pcblockmove .@first_id,0; pcblockmove .@oid,0; set .@i,0; while(.@i < .time && !.cancel && .duel) { sleep 5000; set .@i,.@i + 5; } if(.@i >= .time) announce "Death Duel time is over. There was no winner.",bc_all|bc_blue; } sleep 1000; if(.logout && .duel) { announce "One of the participants logged out.",bc_all|bc_blue; set .logout,false; } if(.cancel) set .cancel,false; set .duel,false; removemapflag .duel_map$,mf_pvp; removemapflag .duel_map$,mf_pvp_nocalcrank; addrid 5,0,.duel_map$; setoption 0x40,0; if(!@duel) { atcommand "@rmvperm disable_pvp"; } else { set @duel,0; set @duel_creator,0; set @wait_duelaid,0; set @wait_duelcid,0; } set .@i,5; while(.@i) { message strcharinfo(0),.@i+" second"+((.@i > 1)? "s" : "")+" to warp you out."; sleep2 1000; set .@i,.@i - 1; } warp "prontera",156,161; pcblockskill getcharid(3),0; end; } else { message strcharinfo(0),"I'm sorry but a duel started a few moments ago."; message strcharinfo(0,.@cid),"I'm sorry but a duel started a few moments ago."; end; } } else { message strcharinfo(0),"The other player disconnected."; } } else { message strcharinfo(0,.@cid),"The challenger changed his mind. The Death Duel is cancelled."; } } else { message strcharinfo(0,@wait_duelcid),"The challenger changed his mind. The Death Duel is cancelled."; } set .duel,false; set .cancel,false; if(playerattached()) { message strcharinfo(0),"The duel has been cancelled."; if(isloggedin(@wait_duelaid,@wait_duelcid)) { message strcharinfo(0,@wait_duelcid),"The duel has been cancelled."; set @duel_creator,0,@wait_duelcid; set @wait_duelaid,0,@wait_duelcid; set @wait_duelcid,0,@wait_duelcid; set @duel,0,@wait_duelcid; } set @duel_creator,0; set @wait_duelaid,0; set @wait_duelcid,0; set @duel,0; close; } } else { message strcharinfo(0),"The character who challenged you is now offline."; set @wait_duelaid,0; set @wait_duelcid,0; } } else { message strcharinfo(0),"There is no death duel invite for you right now."; } close; OnReject: if(@duel) { message strcharinfo(0),"You're already in a duel."; } else if(@duel_creator) { message strcharinfo(0),"You have to wait for your opponent to choose."; } else if(@wait_duelaid) { message strcharinfo(0),"You rejected the duel."; if(isloggedin(@wait_duelaid,@wait_duelcid)) { message strcharinfo(0,@wait_duelcid),strcharinfo(0)+" has rejected the duel."; set .@id,@wait_duelaid; } set @wait_duelaid,0; set @wait_duelcid,0; if(.@id) { attachrid .@id; set @wait_duelaid,0; set @wait_duelcid,0; } set .cancel,true; awake "Duel_Death"; } else { message strcharinfo(0),"You haven't been challenged to a duel."; } end; OnSpectate: if(@duel) { message strcharinfo(0),"You're part of the duel."; } else if(.duel) { if(strcharinfo(3) == .duel_map$) { message strcharinfo(0),"You're already in the map."; } else { setoption 0x40,1; atcommand "@addperm disable_pvp"; pcblockskill getcharid(3),1; warp .duel_map$,0,0; } } else { message strcharinfo(0),"There isn't a duel right now."; } end; OnPCKillEvent: if(@duel && killedrid == @duel) { set .duel_delay,gettimetick(2) + 5*60; set .duel,false; set .@oid,getcharid(3); announce strcharinfo(0)+" has won a Death Duel against "+rid2name(@duel)+"!",bc_all|bc_blue; announce rid2name(@duel)+" was deleted.",bc_all|bc_blue; attachrid @duel; setarray .@char_delete$[0],"bonus_script","char","cart_inventory","elemental","friends","global_reg_value","guild","guild_member","homunculus","hotkey","inventory","memo","mercenary","mercenary_owner","pet","quest","sc_data","skill","skillcooldown"; set .@deadplayer,getcharid(0); message strcharinfo(0),"Game Over"; atcommand "@kick "+strcharinfo(0); set .@j, getarraysize( .@char_delete$ ); for (.@i = 0; .@i < .@j; .@i++) { query_sql("DELETE FROM `"+ .@char_delete$[.@i] +"` WHERE `char_id` = '"+ .@deadplayer +"'"); } query_sql "DELETE FROM `party` WHERE `leader_char` = '"+.@deadplayer+"'"; } end; OnPCLogoutEvent: if(@wait_duelaid) { message strcharinfo(0,@wait_duelcid),"The other player disconnected."; set @wait_duelaid,0,@wait_duelcid; set @creator_duel,0,@wait_duelcid; set @wait_duelcid,0,@wait_duelcid; } if(@duel) { set .cancel,true; set .logout,true; awake "Duel_Death"; } end; OnPCLoginEvent: if(checkoption(0x40) && getgmlevel() < 60) setoption 0x40,0; end; OnInit: // Map set .duel_map$,"pvp_n_8-5"; // Coordinates set .duel_xy$, "95,100,"+ // x,y first player "103,100"; // x,y second player bindatcmd "deathduel","Duel_Death::OnCommand"; bindatcmd "acceptdd","Duel_Death::OnAccept"; bindatcmd "rejectdd","Duel_Death::OnReject"; bindatcmd "spectatedd","Duel_Death::OnSpectate"; // Max duration of a duel (seconds). set .time,20; end; } pvp_n_8-5 mapflag pvp pvp_n_8-5 mapflag pvp_nocalcrank pvp_n_8-5 mapflag noreturn pvp_n_8-5 mapflag nowarp pvp_n_8-5 mapflag nocommand 99 pvp_n_8-5 mapflag nowarpto pvp_n_8-5 mapflag nosave SavePoint pvp_n_8-5 mapflag nomemo pvp_n_8-5 mapflag notrade pvp_n_8-5 mapflag nodrop pvp_n_8-5 mapflag nobranch pvp_n_8-5 mapflag nochat pvp_n_8-5 mapflag novending
×
×
  • Create New...