Leaderboard
Popular Content
Showing content with the highest reputation on 11/29/18 in all areas
-
What if you removed Doram race from your server and client... ...but it just left a ugly space on the char creation window? Well here comes the solution. I simply edited the file and made use of the space. You can edit it individually. A .psd file is included for Photoshop/GIMP edits. (Instruction is also included) Download here ~ Requirements:5 points
-
Version 2.2
874 downloads
This is just a buffer NPC that I made for someone in the script request section. It's pretty versatile and sturdy so instead of it being depreciated I thought others might use it. Description: Select from a list of buffs the ones you want to purchase each time you buff. Double click to reselect buffs. Everything is stored in one character variable. ( preview slowed to increase loading times )Free2 points -
I like that idea. I also wanted to add an option where you could split the npcs up. So one for changing buffs and one for setting buffs since double-clicking is a little dodgy. Edit: @Radian Done.2 points
-
View File Selection Buffer This is just a buffer NPC that I made for someone in the script request section. It's pretty versatile and sturdy so instead of it being depreciated I thought others might use it. Description: Select from a list of buffs the ones you want to purchase each time you buff. Double click to reselect buffs. Everything is stored in one character variable. ( preview slowed to increase loading times ) Submitter Skorm Submitted 08/05/14 Category Utilities Video Content Author Skorm1 point
-
This tutorial will leads you to Set multiple char-server as shown as multi services after login in RO Client Set multiple map-servers for 1 char-server A Lazy setup So called Lazy setup because this guide only "copy" the necessary super minimum config file. The Lazy config will runs same server cores, so if server is compiled in renewal, you only can change the rates as example to make different server types (mod, renewal vs pre) you have to copy/separate the rathena files, u will understand if you can understand this basic (... that's what I thought) How to make it no lazy? Just copy the folders, restructure by using decent directory names... so lazy to write it now, maybe later I've seen the setup before, years ago, can't recall where, maybe in old wiki? Because in current wiki is just like this: Multiple Servers. 1 Login-server with Multiple Char-Server 1 login-server set just like your normal setup add 1 more connection account in login (sex = 'S'), the username & password must be different with the first one. Example by default is s1 and p1, this entry be s2 and p2 2 char-servers char-server A set just like your normal setup map-server A.1 set just like normal setup char-server B copy conf/char_athena.conf as conf/char_athena2.conf change the userid: s2 change the passwd: p2 change the server_name: rAthena-2 change the char_port: 6122 map-server B.1 copy conf/map_athena.conf as conf/map_athena2.conf change the userid: s2 change the passwd: p2 change the char_port to match char-server B, 6122 change the map_port: 5122 in addition maybe you later can copy conf/battle/* to conf/battle2/*, so just do this int this example. So you need to copy conf/battle_athena.conf to conf/battle2/battle_athena.conf MySQL Databases DB1 Create database with name (if default is) ragnarok Do normal config, import everything just like normal config DB2 Create database with name ragnarok2 Do normal config, import everything just like normal config inter_athena.conf setup Inter-1 set as normal setup Inter-2 copy conf/inter_athena.conf as conf/inter_athena2.conf set as normal setup change the char_server_id to ragnarok2 change the map_server_id to ragnarok2 change the log_db_id to ragnarok2 Run the servers Run login-server Run char-server A and map-server A1 just like running a server For the 2nd server (char-server B and map-server B.1) follow this You can run manually by open command line or copy the charserv.bat and mapserv.bat file (that's why I against deleting .bat file in compilation), by following char-server.exe--inter-config conf/inter_athena2.conf --char-config conf/char_athena2.conf map-server.exe --inter-config conf/inter_athena2.conf --map-config conf/map_athena2.conf --battle-config conf/battle2/battle_athena.conf 1 Char-Server with Multiple Map-servers By simple examples you want 2nd map-server have towns only And this map-servers are part of Char-Server B be careful between map_athena and maps_athena, there's "s" and there is not. Map-Server B.1 From conf/map_athena2.conf Change import: conf/maps_athena.conf to import: conf/maps_athenaB1.conf Copy conf/maps_athena.conf to conf/maps_athenaB1.conf Remove/comment payon, prontera, izlude, morocc, and other cities from this map-server in file conf/maps_athenaB1.conf Copy npc/script Map-server B.2 Copy conf/map_athena2.conf to conf/map_athena2a.conf Set map_port: 5123 (5121 used for Map-server B.1, while 5122 for B.2) Change import: conf/maps_athenaB1.conf to import: conf/maps_athenaB2.conf Make a new file conf/maps_athenaB2.conf Add the entries map: payon map: prontera map: izlude map: morocc // ... Now re-run the Map-server B2 then following by B3 map-server.exe --inter-config conf/inter_athena2.conf --map-config conf/map_athena2.conf --battle-config conf/battle2/battle_athena.conf map-server.exe --inter-config conf/inter_athena2.conf --map-config conf/map_athena2a.conf --battle-config conf/battle2/battle_athena.conf Your map-servers will be run wil neat error messages because missing NPC LOL. Because map-server will hardcoded-ly reads NPC scripts listing from /npc/[pre-]re/scripts_main.conf, you can redefine the path in config file LOL. That's why I say this setup is lazy, because I lazy to copy 'rathena' dir to another dir > then to give an example to remove unnecesary NPCs Known Multi Server Issues Multi Char-server issues None yet Multi Map-server issues Some atcommands, such who commands Calling player from other map-server, such Emergency Call skill Channel System Guild storage dupe, yeah, never enable (at)gstorage command if you run this mode The rest later, I forgot all topic references Map-server reads scripts_main.conf from same root directory, can redefine Image, video, or any materials to make this tutorial can be fancier, will be added later (so much later....)1 point
-
Version 1.0.6
4612 downloads
Extended Vending 2.0 Made in Git Hash: '042b88623bf549b88ba619991aaa186d45f7f998' Description Yet another version of Extended Vending, this one works in actual rA c++. It has a few fixes, including vending tax only working with Zeny as currency. What is new? I tried to improve this amazing mod adding a new feature: Vending Report (Mailbox). Basically... whenever you buy items to a vendor, he receive a report that who bough,what items, how many and total profit of them. You can disable this feature through conf/feature, or If you want to disable it for a specific player you must set the permanent variable called NOVREPORT (by a NPC/Bindatcmd/Idk) For < 2015-05-13 Clients Since old mailbox has 300 characters less than RoDex, I decided to take off items name and amount. So only will send 'who bought' and 'total profit'. Feel free to Donate If you want to support me.Free1 point -
1 point
-
// ============== Credit ===================== // Scripted by WhiteEagle // =============== For ======================= // Delphin Project // =========================================== - script Levelupbox -1,{ OnPCBaseLvUpEvent: if(eaclass()&EAJL_UPPER) end; set .@item,501; // Level 1 with Item "Red Potion"; set .@item2,501; // Level 2 with Item "Red Potion"; set .@item3,501; // Level 3 with Item "Red Potion"; set .@item4,501; // Level 4 with Item "Red Potion"; set .@item5,501; // Level 5 with Item "Red Potion"; set .@item6,501; // Level 6 with Item "Red Potion"; set .@item7,501; // Level 7 with Item "Red Potion"; set .@item8,501; // Level 8 with Item "Red Potion"; set .@item9,501; // Level 9 with Item "Red Potion"; set .@item10,501; // Level 10 with Item "Red Potion"; set .@item11,501; // Level 11 with Item "Red Potion"; set .@item12,501; // Level 12 with Item "Red Potion"; set .@item13,501; // Level 13 with Item "Red Potion"; set .@item14,501; // Level 14 with Item "Red Potion"; set .@item15,501; // Level 15 with Item "Red Potion"; set .@effect,71; // Specialeffect Spiral White balls set .@effect2,72; // Specialeffect Bigger Spiral White balls set .@effect3,73; // Specialeffect Blue/White Small Aura if(BaseLevel == 10) { specialeffect2 .@effect; specialeffect2 .@effect2; specialeffect2 .@effect3; getitem .@item,1; dispbottom "Congratulation "+strcharinfo(0)+" to level 10!"; end; } if(BaseLevel == 20) { specialeffect2 .@effect; specialeffect2 .@effect2; specialeffect2 .@effect3; getitem .@item2,1; dispbottom "Congratulation "+strcharinfo(0)+" to level 20!"; end; } if(BaseLevel == 30) { specialeffect2 .@effect; specialeffect2 .@effect2; specialeffect2 .@effect3; getitem .@item3,1; dispbottom "Congratulation "+strcharinfo(0)+" to level 30!"; end; } if(BaseLevel == 40) { specialeffect2 .@effect; specialeffect2 .@effect2; specialeffect2 .@effect3; getitem .@item4,1; dispbottom "Congratulation "+strcharinfo(0)+" to level 40!"; end; } if(BaseLevel == 50) { specialeffect2 .@effect; specialeffect2 .@effect2; specialeffect2 .@effect3; getitem .@item5,1; dispbottom "Congratulation "+strcharinfo(0)+" to level 50!"; end; } if(BaseLevel == 60) { specialeffect2 .@effect; specialeffect2 .@effect2; specialeffect2 .@effect3; getitem .@item6,1; dispbottom "Congratulation "+strcharinfo(0)+" to level 60!"; end; } if(BaseLevel == 70) { specialeffect2 .@effect; specialeffect2 .@effect2; specialeffect2 .@effect3; getitem .@item7,1; dispbottom "Congratulation "+strcharinfo(0)+" to level 70!"; end; } if(BaseLevel == 80) { specialeffect2 .@effect; specialeffect2 .@effect2; specialeffect2 .@effect3; getitem .@item8,1; dispbottom "Congratulation "+strcharinfo(0)+" to level 80!"; end; } if(BaseLevel == 90) { specialeffect2 .@effect; specialeffect2 .@effect2; specialeffect2 .@effect3; getitem .@item9,1; dispbottom "Congratulation "+strcharinfo(0)+" to level 90!"; end; } if(BaseLevel == 100) { specialeffect2 .@effect; specialeffect2 .@effect2; specialeffect2 .@effect3; getitem .@item10,1; dispbottom "Congratulation "+strcharinfo(0)+" to level 100!"; end; } if(BaseLevel == 110) { specialeffect2 .@effect; specialeffect2 .@effect2; specialeffect2 .@effect3; getitem .@item11,1; dispbottom "Congratulation "+strcharinfo(0)+" to level 110!"; end; } if(BaseLevel == 120) { specialeffect2 .@effect; specialeffect2 .@effect2; specialeffect2 .@effect3; getitem .@item12,1; dispbottom "Congratulation "+strcharinfo(0)+" to level 120!"; end; } if(BaseLevel == 130) { specialeffect2 .@effect; specialeffect2 .@effect2; specialeffect2 .@effect3; getitem .@item13,1; dispbottom "Congratulation "+strcharinfo(0)+" to level 130!"; end; } if(BaseLevel == 140) { specialeffect2 .@effect; specialeffect2 .@effect2; specialeffect2 .@effect3; getitem .@item14,1; dispbottom "Congratulation "+strcharinfo(0)+" to level 140!"; end; } if(BaseLevel == 150) { specialeffect2 .@effect; specialeffect2 .@effect2; specialeffect2 .@effect3; getitem .@item15,1; dispbottom "Congratulation "+strcharinfo(0)+" to level 150!"; end; } } Like this?1 point
-
1 point
-
Done. Anything else, I'm here. - 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 @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(@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(select("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(select("Não","Sim") == 2) { 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; setmapflag .duel_map$,mf_pvp,false; set .@first_id,getcharid(3); explode .@xy$,.duel_xy$,","; set .@r,rand(2); set @duel,.@oid; set @wait_duelaid,0; set @wait_duelcid,0; warp .duel_map$,atoi(.@xy$[2*.@r]),atoi(.@xy$[2*.@r + 1]); setoption 0x40,0; attachrid .@oid; set @duel,@wait_duelaid; set @wait_duelaid,0; set @wait_duelcid,0; set .@r,!.@r; warp .duel_map$,atoi(.@xy$[2*.@r]),atoi(.@xy$[2*.@r + 1]); setoption 0x40,0; 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; if(!isloggedin(.@oid) || !isloggedin(.@first_id)) announce "One of the participans logged out.",bc_all|bc_blue; } else { setmapflag .duel_map$,mf_pvp,true; while(.@i < .time && !.cancel) { sleep 5000; set .@i,.@i + 5; } } if(.@i >= .time) announce "Death Duel time is over. There was no winner.",bc_all|bc_blue; if(.cancel) set .cancel,false; set .duel,false; setmapflag .duel_map$,mf_pvp,false; addrid 5,0,.duel_map$; setoption 0x40,0; if(!@duel) atcommand "@rmvperm disable_pvp"; else set @duel,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,.@cid),"The challenger changed his mind. The Death Duel is cancelled."; } } if(!.duel || .cancel) { 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 .@id,@wait_duelaid; } set @wait_duelaid,0; set @wait_duelcid,0; close2; if(.@id) { attachrid .@id; set @wait_duelaid,0; set @wait_duelcid,0; } } end; } } else { message strcharinfo(0),"The character who challenged you is now offline."; set @wait_duelaid,0; set @wait_duelcid,0; } } else { message strcharinfo(0),"You haven't been challenged to a duel."; } close; OnReject: if(@duel) { message strcharinfo(0),"You're already in a duel."; } 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 .@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+"'"; attachrid .@oid; } end; OnPCLogoutEvent: if(@duel) { set .cancel,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,10*120; 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 novending1 point
-
1 point
-
It shouldn't because the variable is a npc one, not a character one. But if you logout it means the variable was set to 0 again because the OnPCLogoutEvent got executed. But there's a 5 second refresh between the loops. Maybe if I refresh it so when a character logs out it's instantly canceled? - 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 { 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(@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(select("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(select("Não","Sim") == 2) { 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; setmapflag .duel_map$,mf_pvp,false; set .@first_id,getcharid(3); explode .@xy$,.duel_xy$,","; set .@r,rand(2); set @duel,.@oid; set @wait_duelaid,0; set @wait_duelcid,0; warp .duel_map$,atoi(.@xy$[2*.@r]),atoi(.@xy$[2*.@r + 1]); setoption 0x40,0; attachrid .@oid; set @duel,@wait_duelaid; set @wait_duelaid,0; set @wait_duelcid,0; set .@r,!.@r; warp .duel_map$,atoi(.@xy$[2*.@r]),atoi(.@xy$[2*.@r + 1]); setoption 0x40,0; 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; if(!isloggedin(.@oid) || !isloggedin(.@first_id)) announce "One of the participans logged out.",bc_all|bc_blue; set .cancel,false; } else { setmapflag .duel_map$,mf_pvp,true; donpcevent "Duel_Death::OnStuck"; } end; } else { message strcharinfo(0,.@cid),"The challenger changed his mind. The Death Duel is cancelled."; } } if(!.duel) { 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 .@id,@wait_duelaid; } set @wait_duelaid,0; set @wait_duelcid,0; close2; if(.@id) { attachrid .@id; set @wait_duelaid,0; set @wait_duelcid,0; } end; } } else { message strcharinfo(0),"The character who challenged you is now offline."; set @wait_duelaid,0; set @wait_duelcid,0; } } else { message strcharinfo(0),"You haven't been challenged to a duel."; } close; OnReject: if(@duel) { message strcharinfo(0),"You're already in a duel."; } 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; } 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 .@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+"'"; attachrid .@oid; } end; OnPCLogoutEvent: if(@duel) { set .cancel,true; awake "Death_Duel"; } end; OnPCLoginEvent: if(checkoption(0x40) && getgmlevel() < 60) setoption 0x40,0; end; OnStuck: while(.@i < .time && !.cancel) { sleep 5000; set .@i,.@i + 5; } if(.cancel) set .cancel,false; set .duel,false; addrid 5,0,.duel_map$; setoption 0x40,0; if(!@duel) atcommand "@rmvperm disable_pvp"; else set @duel,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; 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,10*120; 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 novending1 point
-
It's not 100% necessary and I don't have a test server to test right now.1 point
-
This is one of the weirdest bugs because the variable .cancel shouldn't be defined and that var only happens if one logouts or rejects. I changed it a little, but tell me how it goes - 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 { 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(@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(select("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(select("Não","Sim") == 2) { 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; setmapflag .duel_map$,mf_pvp,false; set .@first_id,getcharid(3); explode .@xy$,.duel_xy$,","; set .@r,rand(2); set @duel,.@oid; set @wait_duelaid,0; set @wait_duelcid,0; warp .duel_map$,atoi(.@xy$[2*.@r]),atoi(.@xy$[2*.@r + 1]); setoption 0x40,0; attachrid .@oid; set @duel,@wait_duelaid; set @wait_duelaid,0; set @wait_duelcid,0; set .@r,!.@r; warp .duel_map$,atoi(.@xy$[2*.@r]),atoi(.@xy$[2*.@r + 1]); setoption 0x40,0; 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; if(!isloggedin(.@oid) || !isloggedin(.@first_id)) announce "One of the participans logged out.",bc_all|bc_blue; set .cancel,false; } else { setmapflag .duel_map$,mf_pvp,true; donpcevent "Duel_Death::OnStuck"; } end; } else { message strcharinfo(0,.@cid),"The challenger changed his mind. The Death Duel is cancelled."; } } if(!.duel) { 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 .@id,@wait_duelaid; } set @wait_duelaid,0; set @wait_duelcid,0; close2; if(.@id) { attachrid .@id; set @wait_duelaid,0; set @wait_duelcid,0; } end; } } else { message strcharinfo(0),"The character who challenged you is now offline."; set @wait_duelaid,0; set @wait_duelcid,0; } } else { message strcharinfo(0),"You haven't been challenged to a duel."; } close; OnReject: if(@duel) { message strcharinfo(0),"You're already in a duel."; } 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; } 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 .@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+"'"; attachrid .@oid; } end; OnPCLogoutEvent: if(@duel) set .cancel,true; end; OnPCLoginEvent: if(checkoption(0x40) && getgmlevel() < 60) setoption 0x40,0; end; OnStuck: while(.@i < .time && !.cancel) { sleep 5000; set .@i,.@i + 5; } if(.cancel) set .cancel,false; set .duel,false; addrid 5,0,.duel_map$; setoption 0x40,0; if(!@duel) atcommand "@rmvperm disable_pvp"; else set @duel,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; 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,10*120; 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 novending1 point
-
- 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 { 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(@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(select("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(select("Não","Sim") == 2) { 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; setmapflag .duel_map$,mf_pvp,false; set .@first_id,getcharid(3); explode .@xy$,.duel_xy$,","; set .@r,rand(2); set @duel,.@oid; set @wait_duelaid,0; set @wait_duelcid,0; warp .duel_map$,atoi(.@xy$[2*.@r]),atoi(.@xy$[2*.@r + 1]); setoption 0x40,0; attachrid .@oid; set @duel,@wait_duelaid; set @wait_duelaid,0; set @wait_duelcid,0; set .@r,!.@r; warp .duel_map$,atoi(.@xy$[2*.@r]),atoi(.@xy$[2*.@r + 1]); setoption 0x40,0; 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; if(!isloggedin(.@oid) || !isloggedin(.@first_id)) announce "One of the participans logged out.",bc_all|bc_blue; set .cancel,false; } else { setmapflag .duel_map$,mf_pvp,true; donpcevent "Duel_Death::OnStuck"; } end; } else { message strcharinfo(0,.@cid),"The challenger changed his mind. The Death Duel is cancelled."; } } if(!.duel) { 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 .@id,@wait_duelaid; } set @wait_duelaid,0; set @wait_duelcid,0; close2; if(.@id) { attachrid .@id; set @wait_duelaid,0; set @wait_duelcid,0; } end; } } else { message strcharinfo(0),"The character who challenged you is now offline."; set @wait_duelaid,0; set @wait_duelcid,0; } } else { message strcharinfo(0),"You haven't been challenged to a duel."; } close; OnReject: if(@duel) { message strcharinfo(0),"You're already in a duel."; } 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; } 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 .@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+"'"; attachrid .@oid; } end; OnPCLogoutEvent: if(@duel) set .cancel,true; end; OnPCLoginEvent: if(checkoption(0x40) && getgmlevel() < 60) setoption 0x40,0; end; OnStuck: while(.@i < .time && .duel && !.cancel) { sleep 5000; set .@i,.@i + 5; } if(.cancel) set .cancel,false; if(.duel) set .duel,false; addrid 5,0,.duel_map$; setoption 0x40,0; if(!@duel) atcommand "@rmvperm disable_pvp"; else set @duel,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; 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,10*120; 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 Let's see now.1 point
-
Here's the latest one, if I recall correctly: herc.ws/board/topic/4509-vendor-control-rewrite/1 point
-
What about now? - 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 { 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(@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(select("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(select("Não","Sim") == 2) { 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; setmapflag .duel_map$,mf_pvp,false; set .@first_id,getcharid(3); explode .@xy$,.duel_xy$,","; set .@r,rand(2); set @duel,.@oid; set @wait_duelaid,0; set @wait_duelcid,0; warp .duel_map$,atoi(.@xy$[2*.@r]),atoi(.@xy$[2*.@r + 1]); setoption 0x40,0; attachrid .@oid; set @duel,@wait_duelaid; set @wait_duelaid,0; set @wait_duelcid,0; set .@r,!.@r; warp .duel_map$,atoi(.@xy$[2*.@r]),atoi(.@xy$[2*.@r + 1]); setoption 0x40,0; detachrid; set .@i,30; while(.@i > 0 && !.cancel && isloggedin(.@oid) && isloggedin(.@first_id)) { 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; if(!isloggedin(.@oid) || !isloggedin(.@first_id)) announce "One of the participans logged out.",bc_all|bc_blue; set .cancel,0; } else { setmapflag .duel_map$,mf_pvp,true; donpcevent "Duel_Death::OnStuck"; } end; } else { message strcharinfo(0,.@cid),"The challenger changed his mind. The Death Duel is cancelled."; } } if(!.duel) { 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 .@id,@wait_duelaid; } set @wait_duelaid,0; set @wait_duelcid,0; close2; if(.@id) { attachrid .@id; set @wait_duelaid,0; set @wait_duelcid,0; } end; } } else { message strcharinfo(0),"The character who challenged you is now offline."; set @wait_duelaid,0; set @wait_duelcid,0; } } else { message strcharinfo(0),"You haven't been challenged to a duel."; } close; OnReject: if(@duel) { message strcharinfo(0),"You're already in a duel."; } 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; } 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 .@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+"'"; attachrid .@oid; } end; OnPCLogoutEvent: if(@duel) set .duel,false; end; OnPCLoginEvent: if(checkoption(0x40) && getgmlevel() < 60) setoption 0x40,0; end; OnStuck: while(.@i < .time && .duel && !.cancel) { sleep 5000; set .@i,.@i + 5; } if(.cancel) set .cancel,false; if(.duel) set .duel,false; addrid 5,0,.duel_map$; setoption 0x40,0; if(!@duel) atcommand "@rmvperm disable_pvp"; else set @duel,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; 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,10*120; 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 novending1 point
-
Change: to: And don't forget to put the name here: Something like [Rental] Headgears1 point
-
1 point
-
View File Snatch Modification SRC Modification of skill "RG_INTIMIDATE, Snatch". Teleport the player near a mob with the same id or near a monster with the same race present on the current map (if none, on random location). That's only a patch to apply on your rathena folder. Don't forget to thumbs up me if you like my content~ Submitter Vykimo Submitted 11/13/2018 Category Source Modifications Video https://www.youtube.com/watch?v=z6P1T_Cf6ZU Content Author Vykimo1 point
-
Since i have sometime...... src/common/mapindex.h add this //Some definitions for the mayor city maps. #define MAP_MELLINA "mellina" src/map/atcommand.c find this const struct { char map[MAP_NAME_LENGTH]; int x, y; } data[] = { { MAP_PRONTERA, 156, 191 }, // 0=Prontera { MAP_MORROC, 156, 93 }, // 1=Morroc { MAP_GEFFEN, 119, 59 }, // 2=Geffen { MAP_PAYON, 162, 233 }, // 3=Payon { MAP_ALBERTA, 192, 147 }, // 4=Alberta { MAP_IZLUDE, 128, 114 }, // 5=Izlude { MAP_ALDEBARAN, 140, 131 }, // 6=Al de Baran { MAP_LUTIE, 147, 134 }, // 7=Lutie { MAP_COMODO, 209, 143 }, // 8=Comodo { MAP_YUNO, 157, 51 }, // 9=Yuno { MAP_AMATSU, 198, 84 }, // 10=Amatsu { MAP_GONRYUN, 160, 120 }, // 11=Gonryun { MAP_UMBALA, 89, 157 }, // 12=Umbala { MAP_NIFLHEIM, 21, 153 }, // 13=Niflheim { MAP_LOUYANG, 217, 40 }, // 14=Louyang { MAP_NOVICE, 53, 111 }, // 15=Training Grounds { MAP_JAIL, 23, 61 }, // 16=Prison { MAP_JAWAII, 249, 127 }, // 17=Jawaii { MAP_AYOTHAYA, 151, 117 }, // 18=Ayothaya { MAP_EINBROCH, 64, 200 }, // 19=Einbroch { MAP_LIGHTHALZEN, 158, 92 }, // 20=Lighthalzen { MAP_EINBECH, 70, 95 }, // 21=Einbech { MAP_HUGEL, 96, 145 }, // 22=Hugel { MAP_RACHEL, 130, 110 }, // 23=Rachel { MAP_VEINS, 216, 123 }, // 24=Veins { MAP_MOSCOVIA, 223, 184 }, // 25=Moscovia { MAP_BRASILIS, 182, 239 }, // 26=Brasilis { MAP_MANUK, 282, 138 }, // 27=Manuk { MAP_SPLENDIDE, 197, 176 }, // 28=Splendide }; change to this const struct { char map[MAP_NAME_LENGTH]; int x, y; } data[] = { { MAP_MELLINA, 64,64 }, // 0=Mellina { MAP_PRONTERA, 156, 191 }, // 1=Prontera { MAP_MORROC, 156, 93 }, // 2=Morroc { MAP_GEFFEN, 119, 59 }, // 3=Geffen { MAP_PAYON, 162, 233 }, // 4=Payon { MAP_ALBERTA, 192, 147 }, // 5=Alberta { MAP_IZLUDE, 128, 114 }, // 6=Izlude { MAP_ALDEBARAN, 140, 131 }, // 7=Al de Baran { MAP_LUTIE, 147, 134 }, // 8=Lutie { MAP_COMODO, 209, 143 }, // 9=Comodo { MAP_YUNO, 157, 51 }, // 10=Yuno { MAP_AMATSU, 198, 84 }, // 11=Amatsu { MAP_GONRYUN, 160, 120 }, // 12=Gonryun { MAP_UMBALA, 89, 157 }, // 13=Umbala { MAP_NIFLHEIM, 21, 153 }, // 14=Niflheim { MAP_LOUYANG, 217, 40 }, // 15=Louyang { MAP_NOVICE, 53, 111 }, // 16=Training Grounds { MAP_JAIL, 23, 61 }, // 17=Prison { MAP_JAWAII, 249, 127 }, // 18=Jawaii { MAP_AYOTHAYA, 151, 117 }, // 19=Ayothaya { MAP_EINBROCH, 64, 200 }, // 20=Einbroch { MAP_LIGHTHALZEN, 158, 92 }, // 21=Lighthalzen { MAP_EINBECH, 70, 95 }, // 22=Einbech { MAP_HUGEL, 96, 145 }, // 23=Hugel { MAP_RACHEL, 130, 110 }, // 24=Rachel { MAP_VEINS, 216, 123 }, // 25=Veins { MAP_MOSCOVIA, 223, 184 }, // 26=Moscovia { MAP_BRASILIS, 182, 239 }, // 27=Brasilis { MAP_MANUK, 282, 138 }, // 28=Manuk { MAP_SPLENDIDE, 197, 176 }, // 29=Splendide }; Now...find this if (!message || !*message || sscanf(message, "%11s", map_name) < 1 || town < 0 || town >= ARRAYLENGTH(data)) { clif_displaymessage(fd, msg_txt(38)); // Invalid location number, or name. clif_displaymessage(fd, msg_txt(82)); // Please provide a name or number from the list provided: clif_displaymessage(fd, " 0=Prontera 1=Morroc 2=Geffen"); clif_displaymessage(fd, " 3=Payon 4=Alberta 5=Izlude"); clif_displaymessage(fd, " 6=Al De Baran 7=Lutie 8=Comodo"); clif_displaymessage(fd, " 9=Yuno 10=Amatsu 11=Gonryun"); clif_displaymessage(fd, " 12=Umbala 13=Niflheim 14=Louyang"); clif_displaymessage(fd, " 15=Novice Grounds 16=Prison 17=Jawaii"); clif_displaymessage(fd, " 18=Ayothaya 19=Einbroch 20=Lighthalzen"); clif_displaymessage(fd, " 21=Einbech 22=Hugel 23=Rachel"); clif_displaymessage(fd, " 24=Veins 25=Moscovia 26=Brasilis"); clif_displaymessage(fd, " 27=Manuk 28=Splendide"); return -1; } change to this if (!message || !*message || sscanf(message, "%11s", map_name) < 1 || town < 0 || town >= ARRAYLENGTH(data)) { clif_displaymessage(fd, msg_txt(38)); // Invalid location number, or name. clif_displaymessage(fd, msg_txt(82)); // Please provide a name or number from the list provided: clif_displaymessage(fd, " 0=Mellina 1=Prontera 2=Morroc 3=Geffen"); clif_displaymessage(fd, " 4=Payon 5=Alberta 6=Izlude"); clif_displaymessage(fd, " 7=Al De Baran 8=Lutie 9=Comodo"); clif_displaymessage(fd, " 10=Yuno 11=Amatsu 12=Gonryun"); clif_displaymessage(fd, " 13=Umbala 14=Niflheim 15=Louyang"); clif_displaymessage(fd, " 16=Novice Grounds 17=Prison 18=Jawaii"); clif_displaymessage(fd, " 19=Ayothaya 20=Einbroch 21=Lighthalzen"); clif_displaymessage(fd, " 22=Einbech 23=Hugel 24=Rachel"); clif_displaymessage(fd, " 25=Veins 26=Moscovia 27=Brasilis"); clif_displaymessage(fd, " 28=Manuk 29=Splendide"); return -1; } then find this // get possible name of the city map_name[MAP_NAME_LENGTH-1] = '0'; for (i = 0; map_name[i]; i++) map_name[i] = TOLOWER(map_name[i]); // try to identify the map name if (strncmp(map_name, "prontera", 3) == 0) { town = 0; } else if (strncmp(map_name, "morocc", 3) == 0) { town = 1; } else if (strncmp(map_name, "geffen", 3) == 0) { town = 2; } else if (strncmp(map_name, "payon", 3) == 0 || strncmp(map_name, "paion", 3) == 0) { town = 3; } else if (strncmp(map_name, "alberta", 3) == 0) { town = 4; } else if (strncmp(map_name, "izlude", 3) == 0 || strncmp(map_name, "islude", 3) == 0) { town = 5; } else if (strncmp(map_name, "aldebaran", 3) == 0 || strcmp(map_name, "al") == 0) { town = 6; } else if (strncmp(map_name, "lutie", 3) == 0 || strcmp(map_name, "christmas") == 0 || strncmp(map_name, "xmas", 3) == 0 || strncmp(map_name, "x-mas", 3) == 0) { town = 7; } else if (strncmp(map_name, "comodo", 3) == 0) { town = 8; } else if (strncmp(map_name, "yuno", 3) == 0) { town = 9; } else if (strncmp(map_name, "amatsu", 3) == 0) { town = 10; } else if (strncmp(map_name, "gonryun", 3) == 0) { town = 11; } else if (strncmp(map_name, "umbala", 3) == 0) { town = 12; } else if (strncmp(map_name, "niflheim", 3) == 0) { town = 13; } else if (strncmp(map_name, "louyang", 3) == 0) { town = 14; } else if (strncmp(map_name, "new_1-1", 3) == 0 || strncmp(map_name, "startpoint", 3) == 0 || strncmp(map_name, "begining", 3) == 0) { town = 15; } else if (strncmp(map_name, "sec_pri", 3) == 0 || strncmp(map_name, "prison", 3) == 0 || strncmp(map_name, "jails", 3) == 0) { town = 16; } else if (strncmp(map_name, "jawaii", 3) == 0 || strncmp(map_name, "jawai", 3) == 0) { town = 17; } else if (strncmp(map_name, "ayothaya", 3) == 0 || strncmp(map_name, "ayotaya", 3) == 0) { town = 18; } else if (strncmp(map_name, "einbroch", 5) == 0 || strncmp(map_name, "ainbroch", 5) == 0) { town = 19; } else if (strncmp(map_name, "lighthalzen", 3) == 0) { town = 20; } else if (strncmp(map_name, "einbech", 3) == 0) { town = 21; } else if (strncmp(map_name, "hugel", 3) == 0) { town = 22; } else if (strncmp(map_name, "rachel", 3) == 0) { town = 23; } else if (strncmp(map_name, "veins", 3) == 0) { town = 24; } else if (strncmp(map_name, "moscovia", 3) == 0) { town = 25; } else if (strncmp(map_name, "brasilis", 3) == 0) { town = 26; } else if (strncmp(map_name, "manuk", 3) == 0) { town = 27; } else if (strncmp(map_name, "splendide", 3) == 0) { town = 28; } change to this.. // get possible name of the city map_name[MAP_NAME_LENGTH-1] = '0'; for (i = 0; map_name[i]; i++) map_name[i] = TOLOWER(map_name[i]); // try to identify the map name if (strncmp(map_name, "mellina", 3) == 0) { town = 0; } else if (strncmp(map_name, "prontera", 3) == 0) { town = 1; } else if (strncmp(map_name, "morocc", 3) == 0) { town = 2; } else if (strncmp(map_name, "geffen", 3) == 0) { town = 3; } else if (strncmp(map_name, "payon", 3) == 0 || strncmp(map_name, "paion", 3) == 0) { town = 4; } else if (strncmp(map_name, "alberta", 3) == 0) { town = 5; } else if (strncmp(map_name, "izlude", 3) == 0 || strncmp(map_name, "islude", 3) == 0) { town = 6; } else if (strncmp(map_name, "aldebaran", 3) == 0 || strcmp(map_name, "al") == 0) { town = 7; } else if (strncmp(map_name, "lutie", 3) == 0 || strcmp(map_name, "christmas") == 0 || strncmp(map_name, "xmas", 3) == 0 || strncmp(map_name, "x-mas", 3) == 0) { town = 8; } else if (strncmp(map_name, "comodo", 3) == 0) { town = 9; } else if (strncmp(map_name, "yuno", 3) == 0) { town = 10; } else if (strncmp(map_name, "amatsu", 3) == 0) { town = 11; } else if (strncmp(map_name, "gonryun", 3) == 0) { town = 12; } else if (strncmp(map_name, "umbala", 3) == 0) { town = 13; } else if (strncmp(map_name, "niflheim", 3) == 0) { town = 14; } else if (strncmp(map_name, "louyang", 3) == 0) { town = 15; } else if (strncmp(map_name, "new_1-1", 3) == 0 || strncmp(map_name, "startpoint", 3) == 0 || strncmp(map_name, "begining", 3) == 0) { town = 16; } else if (strncmp(map_name, "sec_pri", 3) == 0 || strncmp(map_name, "prison", 3) == 0 || strncmp(map_name, "jails", 3) == 0) { town = 17; } else if (strncmp(map_name, "jawaii", 3) == 0 || strncmp(map_name, "jawai", 3) == 0) { town = 18; } else if (strncmp(map_name, "ayothaya", 3) == 0 || strncmp(map_name, "ayotaya", 3) == 0) { town = 19; } else if (strncmp(map_name, "einbroch", 5) == 0 || strncmp(map_name, "ainbroch", 5) == 0) { town = 20; } else if (strncmp(map_name, "lighthalzen", 3) == 0) { town = 21; } else if (strncmp(map_name, "einbech", 3) == 0) { town = 22; } else if (strncmp(map_name, "hugel", 3) == 0) { town = 23; } else if (strncmp(map_name, "rachel", 3) == 0) { town = 24; } else if (strncmp(map_name, "veins", 3) == 0) { town = 25; } else if (strncmp(map_name, "moscovia", 3) == 0) { town = 26; } else if (strncmp(map_name, "brasilis", 3) == 0) { town = 27; } else if (strncmp(map_name, "manuk", 3) == 0) { town = 28; } else if (strncmp(map_name, "splendide", 3) == 0) { town = 29; } Lastly...Recompile.....using Microsoft Visual C++ 2010 or any Compiler you have1 point