-
Posts
569 -
Joined
-
Last visited
Content Type
Profiles
Forums
Downloads
Jobs Available
Server Database
Third-Party Services
Top Guides
Store
Crowdfunding
Posts posted by Petey Pablo
-
-
On 4/28/2020 at 12:47 PM, Patskie said:
Would that 5 hours mean accumulative regardless if they go offline or not?
-Yes accumulative it will continue time played if they online
-Auto pause the total time played if they go offline
and please add the announce message saying Congratulations this player is eligible for beta rewards on official server launch. Thank you
Dont forget the Beta Rewards NPC that have function to check if this player have playing 5 hours during beta. Thank you very much @Patskie
I need must be ingame for 5 hours or more during beta to this script. Thank you
prontera,150,150,3 script Beta Reward 100,{ if(BaseLevel < 255) goto OnDeny; if(getcharid(3) <= 2000100){ if(#cbtreward == 1) { mes "[ Beta Reward ]"; mes "You already got your reward!"; close; } getitembound 909,1,Bound_Account; // <-- should be bound if you don't want this to be abused. mes "[ Beta Reward ]"; mes "Here's your reward!"; set #cbtreward,1; close; } mes "[ Beta Reward ]"; mes "You're not a beta player, sorry!"; close; OnDeny: mes "[ Beta Reward ]"; mes "You don't have the required level for Beta Reward."; mes "Come back when you reached it - Base Level 255!"; close; }
-
I need beta script npc like the function below
Need to play atleast 5 hours minimum during beta
Claim beta reward on official server launch who played more than 5 hours on beta
Thank you and more power to rA community -
1 hour ago, Naruto said:
Well i can tell you 1 thing and that how you get them in
//===== rAthena Script ======================================= //= Card Seller A-Z //===== Description: ========================================= //= Sells all cards dropped by mobs, grouped alphabetically. //= MVP cards are excluded from the list. //= //= NOTE: Requires SQL item and mob databases. //===== Changelogs: ========================================== //= 1.0 First version [AnnieRuru] //= 1.1 Minor edits [Euphy] //= 1.2 Update for monster mode and enchants [Lemongrass] //============================================================ prontera,155,177,5 script Card Seller 100,{ .@menu$ = getvariableofnpc( .alphabet_menu$, "card_seller_creation" ); if (.@menu$ == "") { mes "[Card Seller]"; mes "I am sorry, it seems like something went wrong."; mes "I cannot find any cards in our database at the moment."; mes "Please contact a game master."; close; } mes "[Card Seller]"; mes "Welcome!"; mes "I can sell you any normal monster card in the game. Would you like to have a look?"; next; .@s = select(.@menu$) -1; close2; callshop "card_mob#"+ getvariableofnpc( .alphabet$[.@s], "card_seller_creation" ), 1; end; } - script card_seller_creation -1,{ end; OnInit: if (checkre(0)) { .@mob_db$ = "mob_db_re"; .@item_db$ = "item_db_re"; } else { .@mob_db$ = "mob_db"; .@item_db$ = "item_db"; } freeloop 1; .@total = query_sql( "SELECT DISTINCT LEFT( `name_japanese`, 1 ) AS alphabets FROM `"+ .@item_db$ +"` WHERE `type` = " + IT_CARD + " AND `id` ORDER BY alphabets;", .@alphabet$ ); for ( .@i = 0; .@i < .@total; .@i++ ) { .@nb = query_sql( "SELECT `"+ .@item_db$ +"`.`id` FROM `"+ .@item_db$ +"` WHERE `type` = " + IT_CARD + " AND LEFT( `name_japanese`, 1 ) = '"+ .@alphabet$[.@i] +"' AND `id` ORDER BY `name_japanese` LIMIT 128;", .@id ); if (.@nb > 0) { .alphabet$[.@size_alphabet++] = .@alphabet$[.@i]; .alphabet_menu$ = .alphabet_menu$ + .@alphabet$[.@i] +" Cards:"; npcshopdelitem "card_mob#"+ .@alphabet$[.@i], 501; for ( .@j = 0; .@j < .@nb; .@j++ ) { if (callfunc( "F_IsCharm", .@id[.@j] ) == true)// Skip enchants in case someone added them as card drop continue; npcshopadditem "card_mob#"+ .@alphabet$[.@i], .@id[.@j], 1000000; } } } freeloop 0; end; } - shop card_mob#A -1,501:1000 - shop card_mob#B -1,501:1000 - shop card_mob#C -1,501:1000 - shop card_mob#D -1,501:1000 - shop card_mob#E -1,501:1000 - shop card_mob#F -1,501:1000 - shop card_mob#G -1,501:1000 - shop card_mob#H -1,501:1000 - shop card_mob#I -1,501:1000 - shop card_mob#J -1,501:1000 - shop card_mob#K -1,501:1000 - shop card_mob#L -1,501:1000 - shop card_mob#M -1,501:1000 - shop card_mob#N -1,501:1000 - shop card_mob#O -1,501:1000 - shop card_mob#P -1,501:1000 - shop card_mob#Q -1,501:1000 - shop card_mob#R -1,501:1000 - shop card_mob#S -1,501:1000 - shop card_mob#T -1,501:1000 - shop card_mob#U -1,501:1000 - shop card_mob#V -1,501:1000 - shop card_mob#W -1,501:1000 - shop card_mob#X -1,501:1000 - shop card_mob#Y -1,501:1000 - shop card_mob#Z -1,501:1000
many many errors... but the mvp cards are in
figure it out all i did was deleted this
IN ( SELECT DISTINCT `dropcardid` FROM `"+ .@mob_db$ +"` WHERE ~(`MODE`) & " + MD_MVP + " )
from both lines
Thank you Hokage you save my life.
-
Need help to add mini boss cards and mvp boss cards btw its card seller from latest rA. Thank you and more power rA community
//===== rAthena Script ======================================= //= Card Seller A-Z //===== Description: ========================================= //= Sells all cards dropped by mobs, grouped alphabetically. //= MVP cards are excluded from the list. //= //= NOTE: Requires SQL item and mob databases. //===== Changelogs: ========================================== //= 1.0 First version [AnnieRuru] //= 1.1 Minor edits [Euphy] //= 1.2 Update for monster mode and enchants [Lemongrass] //============================================================ prontera,147,157,5 script Beta Card Seller 124,{ .@menu$ = getvariableofnpc( .alphabet_menu$, "card_seller_creation" ); if (.@menu$ == "") { mes "[Card Seller]"; mes "I am sorry, it seems like something went wrong."; mes "I cannot find any cards in our database at the moment."; mes "Please contact a game master."; close; } mes "[Card Seller]"; mes "Welcome!"; mes "I can sell you any normal monster card in the game. Would you like to have a look?"; next; .@s = select(.@menu$) -1; close2; callshop "card_mob#"+ getvariableofnpc( .alphabet$[.@s], "card_seller_creation" ), 1; end; } - script card_seller_creation -1,{ end; OnInit: if (checkre(0)) { .@mob_db$ = "mob_db_re"; .@item_db$ = "item_db_re"; } else { .@mob_db$ = "mob_db"; .@item_db$ = "item_db"; } freeloop 1; .@total = query_sql( "SELECT DISTINCT LEFT( `name_japanese`, 1 ) AS alphabets FROM `"+ .@item_db$ +"` WHERE `type` = " + IT_CARD + " AND `id` IN ( SELECT DISTINCT `dropcardid` FROM `"+ .@mob_db$ +"` WHERE ~(`MODE`) & " + MD_MVP + " ) ORDER BY alphabets;", .@alphabet$ ); for ( .@i = 0; .@i < .@total; .@i++ ) { .@nb = query_sql( "SELECT `"+ .@item_db$ +"`.`id` FROM `"+ .@item_db$ +"` WHERE `type` = " + IT_CARD + " AND LEFT( `name_japanese`, 1 ) = '"+ .@alphabet$[.@i] +"' AND `id` IN ( SELECT DISTINCT `dropcardid` FROM `"+ .@mob_db$ +"` WHERE ~(`MODE`) & " + MD_MVP + " ) ORDER BY `name_japanese` LIMIT 128;", .@id ); if (.@nb > 0) { .alphabet$[.@size_alphabet++] = .@alphabet$[.@i]; .alphabet_menu$ = .alphabet_menu$ + .@alphabet$[.@i] +" Cards:"; npcshopdelitem "card_mob#"+ .@alphabet$[.@i], 501; for ( .@j = 0; .@j < .@nb; .@j++ ) { if (callfunc( "F_IsCharm", .@id[.@j] ) == true)// Skip enchants in case someone added them as card drop continue; npcshopadditem "card_mob#"+ .@alphabet$[.@i], .@id[.@j], 1000000; } } } freeloop 0; end; } - shop card_mob#A -1,501:1000 - shop card_mob#B -1,501:1000 - shop card_mob#C -1,501:1000 - shop card_mob#D -1,501:1000 - shop card_mob#E -1,501:1000 - shop card_mob#F -1,501:1000 - shop card_mob#G -1,501:1000 - shop card_mob#H -1,501:1000 - shop card_mob#I -1,501:1000 - shop card_mob#J -1,501:1000 - shop card_mob#K -1,501:1000 - shop card_mob#L -1,501:1000 - shop card_mob#M -1,501:1000 - shop card_mob#N -1,501:1000 - shop card_mob#O -1,501:1000 - shop card_mob#P -1,501:1000 - shop card_mob#Q -1,501:1000 - shop card_mob#R -1,501:1000 - shop card_mob#S -1,501:1000 - shop card_mob#T -1,501:1000 - shop card_mob#U -1,501:1000 - shop card_mob#V -1,501:1000 - shop card_mob#W -1,501:1000 - shop card_mob#X -1,501:1000 - shop card_mob#Y -1,501:1000 - shop card_mob#Z -1,501:1000
-
On 4/26/2020 at 1:09 AM, Emistry said:
// https://rathena.org/board/topic/123699-goldroom-adding-limit-for-300mins/ prontera,155,181,5 script Sample#goldroom 4_F_KAFRA1,{ doevent "gold_room_main::OnTalk"; } // warp portal back prontera ordeal_3-2,123,123,0 warp gold_room_back_prt 1,1,prontera,155,181 // peco peco summon ordeal_3-2,0,0,0,0 monster Peco Peco 1019,200,60000,0,"gold_room_main::OnKill" - script gold_room_main -1,{ OnInit: // gold room map .map$ = "ordeal_3-2"; // entrance fee .zeny_cost = 200000; // rate to get gold .rate = 50; // gold random amount setarray .gold_amount,1,5; setmapflag .map$,mf_noteleport; setmapflag .map$,mf_pvp; setmapflag .map$,mf_pvp_noguild; setmapflag .map$,mf_pvp_noparty; setmapflag .map$,mf_nobranch; setmapflag .map$,mf_nosave; setmapflag .map$,mf_nomemo; setmapflag .map$,mf_noreturn; setmapflag .map$,mf_nowarp; setmapflag .map$,mf_nowarpto; end; OnTalk: mes "Enter Gold Room ?"; if ( .zeny_cost ) mes F_InsertComma( .zeny_cost ) + " Zeny"; switch ( select( "Enter Gold Room", "Exchange Gold Point", "Cancel" )) { case 1: if (gettimetick(0) < #GOLDROOM_CD) { mes "You can only re-enter after "+(#GOLDROOM_CD - gettimetick(0))+" seconds."; } else if ( Zeny < .zeny_cost ) { mes "Not enough Zeny."; } else { #GOLDROOM_CD = gettimetick(0) + (12 * 60 * 60); // 12 hours cooldown. Zeny -= .zeny_cost; deltimer strnpcinfo(3)+"::OnKick"; addtimer (300 * 60 * 1000), strnpcinfo(3)+"::OnKick"; warp .map$,0,0; } break; case 2: mes "You got "+F_InsertComma( #GOLDPOINTS )+" Points"; input .@value,0,#GOLDPOINTS; if ( checkweight( 969, .@value ) ) { #GOLDPOINTS -= .@value; getitem 969,.@value; mes "Gained "+.@value+" Gold."; } else { mes "You overweight."; } default: break; } close; OnKick: if (strcharinfo(3) == .map$) { dispbottom "Gold Room : Time's UP !"; warp "SavePoint", 0, 0; } end; OnKill: if ( .rate < rand( 100 ) ) { .@point = rand( .gold_amount[0],.gold_amount[1] ); #GOLDPOINTS += .@point; dispbottom "Gained "+.@point+" Point. You got "+F_InsertComma( #GOLDPOINTS )+" Points now."; } end; OnPCDieEvent: .@killerrid = killerrid; if ( strcharinfo(3) == .map$ && .@killerrid != getcharid(3) && getmonsterinfo( .@killerrid,MOB_NAME ) != "null" ) { #GOLDPOINTS = 0; dispbottom "You died, you lost all the point."; } end; }
The 300mins and Auto kick is working but they still able to enter the goldroom after 300mins and I dont see the "You can only re-enter after bla bla after 12 hours"
if (gettimetick(0) < #GOLDROOM_CD) { mes "You can only re-enter after "+(#GOLDROOM_CD - gettimetick(0))+" seconds.";
It works! Thank you very much @Emistry.
-
45 minutes ago, Emistry said:
if ( Zeny < .zeny_cost ) { mes "Not enough Zeny."; } else { Zeny -= .zeny_cost; warp .map$,0,0; } break;
change into
if (gettimetick(0) < #GOLDROOM_CD) { mes "You can only re-enter after "+(#GOLDROOM_CD - gettimetick(0))+" seconds."; } else if ( Zeny < .zeny_cost ) { mes "Not enough Zeny."; } else { #GOLDROOM_CD = gettimetick(0) + (12 * 60 * 60); // 12 hours cooldown. Zeny -= .zeny_cost; warp .map$,0,0; } break;
Thank you very much @Emistry
I just want to ask if this with auto kick after 300mins farm and wait for 12 hours cooldown to enter again and how to adjust the time sorry I dont understand the (12 * 60 * 60)
-
Need help to this error
[Error]: npc_parsesrcfile: Unknown syntax in file 'npc/custom/test/valkyriequest.txt', line '95'. Stopping... * w1=if(bry_bry >= 1) goto L_udone; * w2= * w3= * w4=
-
How to make this target new tab
'JoinUsInFacebookLabel' => array('exturl' => 'https://www.facebook.com/<facebook_link>'),
-
Good day rA community! I just want to ask how to create the login.sh, char.sh and map.sh to vnc server? Anyone can help me? im having a problem with this error on running start Start.Desktop on my vnc
This is my Start.Desktop script
[Desktop Entry] Version=1.0 Encoding=UTF-8 Name=Start rAthena Type=Application Terminal=false Exec=/usr/share/test/scripts/start_server.sh Icon=/usr/share/test/img/ragnarok.png
This is the start.server.sh
#!/bin/sh TEST_DIR=/usr/share/test xterm -title "Login Server" -bg black -fg white -hold -e $TEST_DIR/scripts/start_login_server.sh & sleep 1 xterm -title "Char Server" -bg black -fg white -hold -e $TEST_DIR/scripts/start_char_server.sh & sleep 1 xterm -title "Map Server" -bg black -fg white -hold -e $TEST_DIR/scripts/start_map_server.sh &
This is the login, char and map
#!/bin/sh cd /root/Desktop/rAthena ./login-server
#!/bin/sh cd /root/Desktop/rAthena ./char-server
#!/bin/sh cd /root/Desktop/rAthena ./map-server
Thank you
-
4 hours ago, Emistry said:
//================================================== // jawaii - Jawaii, the Honeymoon Island //================================================== jawaii,207,290,10,10 monster Phen 1158,3,3600000,1800000,1234
remove the 1234
Thank you!
-
1 hour ago, Emistry said:
by default, rAthena doesn't have any NPC or event label using "1234" keywords.
if its your custom npc, you're not suppose to remove it
if its your custom npc, and you want to remove the NPC, make sure you remove this event label from the monster.
if you didnt remove any npc but this errors shown, then recheck your event label that attached to the monster.
I switched version of rA from Old (44b80448df07bec285b1a5056ceae519265bd19b)
to latest (dd9b6d30e2785fd9d6f665e89af8c614a8364fe5)
Same happen! I already reported it to github issue here https://github.com/rathena/rathena/issues/4816
-
Help me to find this error I already remove all my scripts but still error after killing Phen mobs in jawaii town btw this is my rA version '44b80448df07bec285b1a5056ceae519265bd19b'
[Error]: npc_event: event not found [1234] [Error]: npc_event: event not found [1234] [Error]: npc_event: event not found [1234]
-
On 4/18/2020 at 11:20 AM, Racaae said:
Hi. Add this after input .@value,0,#GOLDPOINTS;
if (.@value == 0) { mes "Exchange canceled."; close; }
Thank you, how about adding this
Limit farm maximum of 300 minutes(Auto kick after 300mins)
Once you reach your maximum time, you'll need to wait 12 hours before entering again.Help me to add this on my gold room
-Limit 300mins (Auto kick after 5hrs)
-Once you reach the maximum time, you'll need to wait 12 hours to enter again
-The time is per account based
This is my goldroom script. Thank you and more power rA community.// https://rathena.org/board/topic/108888-request-a-gold-room-drop-gold-point/ prontera,155,181,5 script Sample#goldroom 4_F_KAFRA1,{ doevent "gold_room_main::OnTalk"; } // warp portal back prontera ordeal_3-2,123,123,0 warp gold_room_back_prt 1,1,prontera,155,181 // peco peco summon ordeal_3-2,0,0,0,0 monster Peco Peco 1019,200,60000,0,"gold_room_main::OnKill" - script gold_room_main -1,{ OnInit: // gold room map .map$ = "ordeal_3-2"; // entrance fee .zeny_cost = 200000; // rate to get gold .rate = 50; // gold random amount setarray .gold_amount,1,5; setmapflag .map$,mf_noteleport; setmapflag .map$,mf_pvp; setmapflag .map$,mf_pvp_noguild; setmapflag .map$,mf_pvp_noparty; setmapflag .map$,mf_nobranch; setmapflag .map$,mf_nosave; setmapflag .map$,mf_nomemo; setmapflag .map$,mf_noreturn; setmapflag .map$,mf_nowarp; setmapflag .map$,mf_nowarpto; end; OnTalk: mes "Enter Gold Room ?"; if ( .zeny_cost ) mes F_InsertComma( .zeny_cost ) + " Zeny"; switch ( select( "Enter Gold Room", "Exchange Gold Point", "Cancel" )) { case 1: if ( Zeny < .zeny_cost ) { mes "Not enough Zeny."; } else { Zeny -= .zeny_cost; warp .map$,0,0; } break; case 2: mes "You got "+F_InsertComma( #GOLDPOINTS )+" Points"; input .@value,0,#GOLDPOINTS; if ( checkweight( 969, .@value ) ) { #GOLDPOINTS -= .@value; getitem 969,.@value; mes "Gained "+.@value+" Gold."; } else { mes "You overweight."; } default: break; } close; OnKill: if ( .rate < rand( 100 ) ) { .@point = rand( .gold_amount[0],.gold_amount[1] ); #GOLDPOINTS += .@point; dispbottom "Gained "+.@point+" Point. You got "+F_InsertComma( #GOLDPOINTS )+" Points now."; } end; OnPCDieEvent: .@killerrid = killerrid; if ( strcharinfo(3) == .map$ && .@killerrid != getcharid(3) && getmonsterinfo( .@killerrid,MOB_NAME ) != "null" ) { #GOLDPOINTS = 0; dispbottom "You died, you lost all the point."; } end; }
-
53 minutes ago, Jonne said:
Your patch has nothing to do with your error.
Have you tested it for latest rA?
-
This is the error if input 0 exchange point
[Error]: buildin_checkweight: Invalid amount '0'. [Debug]: Source (NPC): gold_room_main (invisible/not on a map)
Full script here
// https://rathena.org/board/topic/108888-request-a-gold-room-drop-gold-point/ prontera,155,181,5 script Sample#goldroom 4_F_KAFRA1,{ doevent "gold_room_main::OnTalk"; } // warp portal back prontera ordeal_3-2,123,123,0 warp gold_room_back_prt 1,1,prontera,155,181 // peco peco summon ordeal_3-2,0,0,0,0 monster Peco Peco 1019,200,60000,0,"gold_room_main::OnKill" - script gold_room_main -1,{ OnInit: // gold room map .map$ = "ordeal_3-2"; // entrance fee .zeny_cost = 200000; // rate to get gold .rate = 50; // gold random amount setarray .gold_amount,1,5; setmapflag .map$,mf_noteleport; setmapflag .map$,mf_pvp; setmapflag .map$,mf_pvp_noguild; setmapflag .map$,mf_pvp_noparty; setmapflag .map$,mf_nobranch; setmapflag .map$,mf_nosave; setmapflag .map$,mf_nomemo; setmapflag .map$,mf_noreturn; setmapflag .map$,mf_nowarp; setmapflag .map$,mf_nowarpto; end; OnTalk: mes "Enter Gold Room ?"; if ( .zeny_cost ) mes F_InsertComma( .zeny_cost ) + " Zeny"; switch ( select( "Enter Gold Room", "Exchange Gold Point", "Cancel" )) { case 1: if ( Zeny < .zeny_cost ) { mes "Not enough Zeny."; } else { Zeny -= .zeny_cost; warp .map$,0,0; } break; case 2: mes "You got "+F_InsertComma( #GOLDPOINTS )+" Points"; input .@value,0,#GOLDPOINTS; if ( checkweight( 969, .@value ) ) { #GOLDPOINTS -= .@value; getitem 969,.@value; mes "Gained "+.@value+" Gold."; } else { mes "You overweight."; } default: break; } close; OnKill: if ( .rate < rand( 100 ) ) { .@point = rand( .gold_amount[0],.gold_amount[1] ); #GOLDPOINTS += .@point; dispbottom "Gained "+.@point+" Point. You got "+F_InsertComma( #GOLDPOINTS )+" Points now."; } end; OnPCDieEvent: .@killerrid = killerrid; if ( strcharinfo(3) == .map$ && .@killerrid != getcharid(3) && getmonsterinfo( .@killerrid,MOB_NAME ) != "null" ) { #GOLDPOINTS = 0; dispbottom "You died, you lost all the point."; } end; }
-
Need help to this error
9>D:\Ragnarok\rathena\src\map\pc.cpp(5496,11): error C2440: 'return': cannot convert from 'int' to 'e_additem_result' 9>D:\Ragnarok\rathena\src\map\pc.cpp(5496,10): message : Conversion to enumeration type requires an explicit cast (static_cast, C-style cast or function-style cast)
This is the patch Protection-(EN-US).patch
-
Need help to modified this hit-delay plugin for rA, Thank you rA community more power!
//===== Hercules Plugin ====================================== //= Warp Hit Delay //===== By: ================================================== //= Dastgir/Hercules //===== Current Version: ===================================== //= 1.4 //===== Description: ========================================= //= You need to wait before warping, if you have been hit //===== Changelog: =========================================== //= v1.0 - Initial Release. //= v1.1 - Now Adjustable Delay from hits from //= player/homun/mobs/etc.. //= v1.1a- Fix Crash from @die. //= v1.2 - Teleportation does not cause delay. //= v1.3 - Players and Others are now separated. //= v1.3a- You can now warp once dead. //= v1.3b- Some Crash Fixes. //= v1.4 - Timer is Reset once dead. //===== Additional Detail: =================================== //= 6 Battle Configs: //= * warp_delay: Seconds*1000 //= * warp_delay_mob: Seconds*1000 //= * warp_delay_pet: Seconds*1000 //= * warp_delay_homun: Seconds*1000 //= * warp_delay_merc: Seconds*1000 //= * warp_delay_others: Seconds*1000 //===== Repo Link: =========================================== //= https://github.com/dastgir/HPM-Plugins //============================================================ #include "common/hercules.h" #include <stdio.h> #include <stdlib.h> #include <string.h> #include "common/HPMi.h" #include "common/memmgr.h" #include "common/mmo.h" #include "common/nullpo.h" #include "common/socket.h" #include "common/strlib.h" #include "common/timer.h" #include "common/mapindex.h" #include "map/clif.h" #include "map/script.h" #include "map/skill.h" #include "map/pc.h" #include "map/map.h" #include "map/battle.h" #include "plugins/HPMHooking.h" #include "common/HPMDataCheck.h" HPExport struct hplugin_info pinfo = { "Warp Delay", SERVER_TYPE_MAP, "1.3b", HPM_VERSION, }; int64 warp_delay = 5000; ///< Seconds*1000 (Second) Delay(For Player). int64 warp_delay_mob = 6000; ///< Seconds*1000 (Second) Delay(For Monster). int64 warp_delay_pet = 7000; ///< Seconds*1000 (Second) Delay(For Pet). int64 warp_delay_homun = 8000; ///< Seconds*1000 (Second) Delay(For Homunculus). int64 warp_delay_merc = 9000; ///< Seconds*1000 (Second) Delay(For Mercenary). int64 warp_delay_others = 10000; ///< Seconds*1000 (Second) Delay(For Others). struct warp_delay_tick { int64 last_hit; enum bl_type who_hit; }; int pc_dead_pre(struct map_session_data **sd, struct block_list **src) { struct warp_delay_tick *delay_data; nullpo_retr(0, sd); if ((delay_data = getFromMSD(*sd, 0)) == NULL) { return 0; } // Reset the Data delay_data->last_hit = 0; delay_data->who_hit = BL_NUL; return 1; } void pc_damage_received(struct map_session_data **sd, struct block_list **src, unsigned int *hp, unsigned int *sp) { struct warp_delay_tick *delay_data; if ((delay_data = getFromMSD(*sd, 0)) == NULL) { CREATE(delay_data,struct warp_delay_tick,1); addToMSD(*sd,delay_data,0,true); } delay_data->last_hit = timer->gettick(); if (*src) delay_data->who_hit = (*src)->type; else delay_data->who_hit = BL_NUL; return; } int pc_setpos_delay(struct map_session_data **sd, unsigned short *map_index, int *x, int *y, enum clr_type *clrtype) { int16 m; struct warp_delay_tick *delay_data; unsigned short mapindex_ = *map_index; int64 temp_delay; if (*sd == NULL) return 0; if (!mapindex_ || !mapindex_id2name(mapindex_) || (m = map->mapindex2mapid(mapindex_)) == -1) { ShowDebug("pc_setpos: Passed mapindex(%d) is invalid!\n", mapindex_); return 1; } if ((delay_data = getFromMSD(*sd, 0)) == NULL) { return 0; } switch(delay_data->who_hit){ case BL_MOB: temp_delay = warp_delay_mob; break; case BL_PET: temp_delay = warp_delay_pet; break; case BL_HOM: temp_delay = warp_delay_homun; break; case BL_MER: temp_delay = warp_delay_merc; break; case BL_NUL: temp_delay = 0; break; case BL_PC: temp_delay = warp_delay; break; default: temp_delay = warp_delay_others; break; } if ((*sd)->status.hp && DIFF_TICK(timer->gettick(), delay_data->last_hit) < temp_delay ){ char output[50]; sprintf(output,"Please Wait %d second before warping.",(int)((temp_delay-DIFF_TICK(timer->gettick(),delay_data->last_hit))/1000)); clif->message((*sd)->fd,output); hookStop(); } return 0; } int battle_config_validate(const char *val,const char *setting,int64 default_delay) { int value = config_switch(val); if (value <= 0){ ShowDebug("Received Invalid Setting for %s(%d), Defaulting to %d\n",setting,value,(int)default_delay); return (int)default_delay; } return value; } void go_warp_delay_bc(const char *key, const char *val) { if (strcmpi(key,"battle_configuration/warp_delay") == 0) { warp_delay = (int64)battle_config_validate(val,"battle_configuration/warp_delay",warp_delay); } else if (strcmpi(key,"battle_configuration/warp_delay_others") == 0) { warp_delay_others = (int64)battle_config_validate(val,"battle_configuration/warp_delay_others",warp_delay_others); } else if (strcmpi(key,"battle_configuration/warp_delay_pet") == 0) { warp_delay_pet = (int64)battle_config_validate(val,"battle_configuration/warp_delay_pet",warp_delay_pet); } else if (strcmpi(key,"battle_configuration/warp_delay_homun") == 0) { warp_delay_homun = (int64)battle_config_validate(val,"battle_configuration/warp_delay_homun",warp_delay_homun); } else if (strcmpi(key,"battle_configuration/warp_delay_mob") == 0) { warp_delay_mob = (int64)battle_config_validate(val,"battle_configuration/warp_delay_mob",warp_delay_mob); } else if (strcmpi(key,"battle_configuration/warp_delay_merc") == 0) { warp_delay_merc = (int64)battle_config_validate(val,"battle_configuration/warp_delay_merc",warp_delay_merc); } else { ShowError("hit-delay: Invalid Configuration '%s'\n", key); } } int go_warp_delay_return_bc(const char *key) { if (strcmpi(key,"battle_configuration/warp_delay") == 0) { return (int)warp_delay; } else if (strcmpi(key,"battle_configuration/warp_delay_others") == 0) { return (int)warp_delay_others; } else if (strcmpi(key,"battle_configuration/warp_delay_pet") == 0) { return (int)warp_delay_pet; } else if (strcmpi(key,"battle_configuration/warp_delay_homun") == 0) { return (int)warp_delay_homun; } else if (strcmpi(key,"battle_configuration/warp_delay_mob") == 0) { return (int)warp_delay_mob; } else if (strcmpi(key,"battle_configuration/warp_delay_merc") == 0) { return (int)warp_delay_merc; } return 0; } HPExport void plugin_init(void) { addHookPre(pc, setpos, pc_setpos_delay); addHookPre(pc, damage, pc_damage_received); addHookPre(pc, dead, pc_dead_pre); } HPExport void server_preinit(void) { addBattleConf("battle_configuration/warp_delay", go_warp_delay_bc, go_warp_delay_return_bc, false); addBattleConf("battle_configuration/warp_delay_mob", go_warp_delay_bc, go_warp_delay_return_bc, false); addBattleConf("battle_configuration/warp_delay_pet", go_warp_delay_bc, go_warp_delay_return_bc, false); addBattleConf("battle_configuration/warp_delay_homun", go_warp_delay_bc, go_warp_delay_return_bc, false); addBattleConf("battle_configuration/warp_delay_merc", go_warp_delay_bc, go_warp_delay_return_bc, false); addBattleConf("battle_configuration/warp_delay_others", go_warp_delay_bc, go_warp_delay_return_bc, false); } HPExport void server_online(void) { ShowInfo("'%s' Plugin by Dastgir/Hercules. Version '%s'\n", pinfo.name, pinfo.version); }
-
13 minutes ago, Patskie said:
It works! Thank you very much @Patskie
-
On 4/17/2020 at 10:07 PM, Patskie said:
Post the code
Here
ACMD_FUNC(pk) { nullpo_retr(-1, sd); if (map_getmapflag(sd->bl.m, MF_PVP) || map_getmapflag(sd->bl.m, MF_GVG) || map_getmapflag(sd->bl.m, MF_GVG_CASTLE) || map_getmapflag(sd->bl.m, MF_GVG_DUNGEON)) { clif_displaymessage(fd, "You can only change your PK state on non-PVP maps."); return -1; } if (!sd->state.pk_mode) { sd->state.pk_mode = 1; clif_displaymessage(fd, "You are now no longer in PK mode."); } else { sd->state.pk_mode = 0; clif_displaymessage(fd, "Returned to normal state."); } return 0; }
On 4/17/2020 at 10:07 PM, Patskie said:Post the code
Before this
/*========================================== * @rura, @warp, @mapmove *------------------------------------------*/
-
14 minutes ago, Patskie said:
On your atcommand.cpp
1.
After
ACMD_DEF(jailfor)
Add
ACMD_DEF2("pk",pk)
2.
Before
ACMD_FUNC(whogm)
Add
ACMD_FUNC(pk) { nullpo_retr(-1, sd); if (map_getmapflag(sd->bl.m, MF_PVP) || map_getmapflag(sd->bl.m, MF_GVG) || map_getmapflag(sd->bl.m, MF_GVG_CASTLE) || map_getmapflag(sd->bl.m, MF_GVG_DUNGEON)) { clif_displaymessage(fd, "You can only change your PK state on non-PVP maps."); return -1; } if (!sd->state.pk_mode) { sd->state.pk_mode = 1; clif_displaymessage(fd, "You are now no longer in PK mode."); } else { sd->state.pk_mode = 0; clif_displaymessage(fd, "Returned to normal state."); } return 0; }
On your pc.hpp
After
unsigned int warping : 1
Add
unsigned int pk_mode : 1;
On your battle.cpp
After
else if (sd->duel_group && !((!battle_config.duel_allow_pvp && mapdata->flag[MF_PVP]) || (!battle_config.duel_allow_gvg && mapdata_flag_gvg(mapdata)))) { if (t_bl->type == BL_PC && (sd->duel_group == ((TBL_PC*)t_bl)->duel_group)) return (BCT_ENEMY & flag) ? 1 : -1; // Duel targets can ONLY be your enemy, nothing else. else return 0; // You can't target anything out of your duel }
Add
else if (map_getmapflag(s_bl->m, MF_PVP) && sd->state.pk_mode && t_bl->type != BL_MOB) return 0;
After
if( ((sd->state.block_action & PCBLOCK_IMMUNE) || (sc->data[SC_KINGS_GRACE] && s_bl->type != BL_PC)) && flag&BCT_ENEMY ) return 0; // Global immunity only to Attacks
Add
if (sd->state.pk_mode && flag&BCT_ENEMY && s_bl->type != BL_MOB && map_getmapflag(s_bl->m, MF_PVP)) return 0;
Recompile and re-test
I cannot create patch today as I am doing something with my Git. So yea do it manually for now
I got this error
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10293,3): error C2059: syntax error: '{' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10293,3): error C2143: syntax error: missing ';' before '{' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10293,3): error C2143: syntax error: missing ';' before '}' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10293,18): error C2059: syntax error: ',' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10294,3): error C2143: syntax error: missing ';' before '{' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10294,3): error C2143: syntax error: missing ';' before '}' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10294,17): error C2059: syntax error: ',' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10295,3): error C2143: syntax error: missing ';' before '{' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10295,3): error C2143: syntax error: missing ';' before '}' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10295,17): error C2059: syntax error: ',' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10296,3): error C2143: syntax error: missing ';' before '{' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10296,3): error C2143: syntax error: missing ';' before '}' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10296,18): error C2059: syntax error: ',' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10297,3): error C2143: syntax error: missing ';' before '{' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10297,3): error C2143: syntax error: missing ';' before '}' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10297,20): error C2059: syntax error: ',' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10298,3): error C2143: syntax error: missing ';' before '{' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10298,3): error C2143: syntax error: missing ';' before '}' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10298,25): error C2059: syntax error: ',' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10299,3): error C2143: syntax error: missing ';' before '{' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10299,3): error C2143: syntax error: missing ';' before '}' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10299,19): error C2059: syntax error: ',' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10300,3): error C2143: syntax error: missing ';' before '{' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10300,3): error C2143: syntax error: missing ';' before '}' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10300,17): error C2059: syntax error: ',' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10301,3): error C2143: syntax error: missing ';' before '{' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10301,3): error C2143: syntax error: missing ';' before '}' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10301,40): error C2059: syntax error: ',' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10302,3): error C2143: syntax error: missing ';' before '{' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10302,3): error C2143: syntax error: missing ';' before '}' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10302,17): error C2059: syntax error: ',' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10303,3): error C2143: syntax error: missing ';' before '{' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10303,3): error C2143: syntax error: missing ';' before '}' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10303,18): error C2059: syntax error: ',' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10304,3): error C2143: syntax error: missing ';' before '{' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10304,3): error C2143: syntax error: missing ';' before '}' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10304,17): error C2059: syntax error: ',' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10305,3): error C2143: syntax error: missing ';' before '{' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10305,3): error C2143: syntax error: missing ';' before '}' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10305,27): error C2059: syntax error: ',' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10306,3): error C2143: syntax error: missing ';' before '{' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10306,3): error C2143: syntax error: missing ';' before '}' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10306,27): error C2059: syntax error: ',' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10307,3): error C2143: syntax error: missing ';' before '{' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10307,3): error C2143: syntax error: missing ';' before '}' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10307,27): error C2059: syntax error: ',' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10308,3): error C2143: syntax error: missing ';' before '{' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10308,3): error C2143: syntax error: missing ';' before '}' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10308,17): error C2059: syntax error: ',' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10309,3): error C2143: syntax error: missing ';' before '{' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10309,3): error C2143: syntax error: missing ';' before '}' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10309,17): error C2059: syntax error: ',' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10310,3): error C2143: syntax error: missing ';' before '{' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10310,3): error C2143: syntax error: missing ';' before '}' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10310,18): error C2059: syntax error: ',' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10311,3): error C2143: syntax error: missing ';' before '{' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10311,3): error C2143: syntax error: missing ';' before '}' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10311,30): error C2059: syntax error: ',' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10312,3): error C2143: syntax error: missing ';' before '{' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10312,3): error C2143: syntax error: missing ';' before '}' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10312,32): error C2059: syntax error: ',' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10313,3): error C2143: syntax error: missing ';' before '{' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10313,3): error C2143: syntax error: missing ';' before '}' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10313,22): error C2059: syntax error: ',' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10314,3): error C2143: syntax error: missing ';' before '{' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10314,3): error C2143: syntax error: missing ';' before '}' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10314,25): error C2059: syntax error: ',' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10315,3): error C2143: syntax error: missing ';' before '{' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10315,3): error C2143: syntax error: missing ';' before '}' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10315,26): error C2059: syntax error: ',' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10316,3): error C2143: syntax error: missing ';' before '{' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10316,3): error C2143: syntax error: missing ';' before '}' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10316,22): error C2059: syntax error: ',' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10317,3): error C2143: syntax error: missing ';' before '{' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10317,3): error C2143: syntax error: missing ';' before '}' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10317,51): error C2059: syntax error: ',' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10318,3): error C2143: syntax error: missing ';' before '{' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10318,3): error C2143: syntax error: missing ';' before '}' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10318,32): error C2059: syntax error: ',' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10319,3): error C2143: syntax error: missing ';' before '{' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10319,3): error C2143: syntax error: missing ';' before '}' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10319,17): error C2059: syntax error: ',' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10320,3): error C2143: syntax error: missing ';' before '{' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10320,3): error C2143: syntax error: missing ';' before '}' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10320,19): error C2059: syntax error: ',' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10321,3): error C2143: syntax error: missing ';' before '{' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10321,3): error C2143: syntax error: missing ';' before '}' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10321,18): error C2059: syntax error: ',' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10322,3): error C2143: syntax error: missing ';' before '{' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10322,3): error C2143: syntax error: missing ';' before '}' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10322,19): error C2059: syntax error: ',' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10323,3): error C2143: syntax error: missing ';' before '{' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10323,3): error C2143: syntax error: missing ';' before '}' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10323,18): error C2059: syntax error: ',' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10324,3): error C2143: syntax error: missing ';' before '{' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10324,3): error C2143: syntax error: missing ';' before '}' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10324,18): error C2059: syntax error: ',' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10325,3): error C2143: syntax error: missing ';' before '{' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10325,3): error C2143: syntax error: missing ';' before '}' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10325,33): error C2059: syntax error: ',' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10326,3): error C2143: syntax error: missing ';' before '{' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(10326,3): fatal error C1003: error count exceeds 100; stopping compilation
-
On 4/17/2020 at 6:54 PM, vMariku said:
Can i see what's error?
This is the error
9>D:\Ragnarok\rathena\src\map\atcommand.cpp(240,4): error C2039: 'pvp': is not a member of 'std::unordered_map<int16,int,std::hash<int16>,std::equal_to<int16>,std::allocator<std::pair<const int16,int>>>' 9>D:\Ragnarok\rathena\src\map\map.hpp(738): message : see declaration of 'std::unordered_map<int16,int,std::hash<int16>,std::equal_to<int16>,std::allocator<std::pair<const int16,int>>>' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(240,4): error C2039: 'gvg': is not a member of 'std::unordered_map<int16,int,std::hash<int16>,std::equal_to<int16>,std::allocator<std::pair<const int16,int>>>' 9>D:\Ragnarok\rathena\src\map\map.hpp(738): message : see declaration of 'std::unordered_map<int16,int,std::hash<int16>,std::equal_to<int16>,std::allocator<std::pair<const int16,int>>>' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(240,4): error C2039: 'gvg_castle': is not a member of 'std::unordered_map<int16,int,std::hash<int16>,std::equal_to<int16>,std::allocator<std::pair<const int16,int>>>' 9>D:\Ragnarok\rathena\src\map\map.hpp(738): message : see declaration of 'std::unordered_map<int16,int,std::hash<int16>,std::equal_to<int16>,std::allocator<std::pair<const int16,int>>>' 9>D:\Ragnarok\rathena\src\map\atcommand.cpp(240,122): error C2039: 'gvg_dungeon': is not a member of 'std::unordered_map<int16,int,std::hash<int16>,std::equal_to<int16>,std::allocator<std::pair<const int16,int>>>' 9>D:\Ragnarok\rathena\src\map\map.hpp(738): message : see declaration of 'std::unordered_map<int16,int,std::hash<int16>,std::equal_to<int16>,std::allocator<std::pair<const int16,int>>>' 9>D:\Ragnarok\rathena\src\map\map.hpp(738): message : see declaration of 'std::unordered_map<int16,int,std::hash<int16>,std::equal_to<int16>,std::allocator<std::pair<const int16,int>>>' 9>D:\Ragnarok\rathena\src\map\battle.cpp(8183,13): error C2039: 'pvp': is not a member of 'std::unordered_map<int16,int,std::hash<int16>,std::equal_to<int16>,std::allocator<std::pair<const int16,int>>>' 9>D:\Ragnarok\rathena\src\map\map.hpp(738): message : see declaration of 'std::unordered_map<int16,int,std::hash<int16>,std::equal_to<int16>,std::allocator<std::pair<const int16,int>>>' 9>D:\Ragnarok\rathena\src\map\battle.cpp(8186,9): error C2065: 'sd': undeclared identifier 9>D:\Ragnarok\rathena\src\map\battle.cpp(8192,3): error C2046: illegal case 9>D:\Ragnarok\rathena\src\map\battle.cpp(8215,3): error C2047: illegal default 9>D:\Ragnarok\rathena\src\map\battle.cpp(8213,4): error C2043: illegal break 9>D:\Ragnarok\rathena\src\map\battle.cpp(8219,4): error C2043: illegal break 9>D:\Ragnarok\rathena\src\map\battle.cpp(8222,2): error C2059: syntax error: 'if' 9>D:\Ragnarok\rathena\src\map\battle.cpp(8223,2): error C2143: syntax error: missing ';' before '{' 9>D:\Ragnarok\rathena\src\map\battle.cpp(8223,2): error C2447: '{': missing function header (old-style formal list?) 9>D:\Ragnarok\rathena\src\map\battle.cpp(8229,2): error C2059: syntax error: 'if' 9>D:\Ragnarok\rathena\src\map\battle.cpp(8232,2): error C2059: syntax error: 'if' 9>D:\Ragnarok\rathena\src\map\battle.cpp(8233,2): error C2143: syntax error: missing ';' before '{' 9>D:\Ragnarok\rathena\src\map\battle.cpp(8233,2): error C2447: '{': missing function header (old-style formal list?) 9>D:\Ragnarok\rathena\src\map\battle.cpp(8240,2): error C2059: syntax error: 'if' 9>D:\Ragnarok\rathena\src\map\battle.cpp(8241,2): error C2143: syntax error: missing ';' before '{' 9>D:\Ragnarok\rathena\src\map\battle.cpp(8241,2): error C2447: '{': missing function header (old-style formal list?) 9>D:\Ragnarok\rathena\src\map\battle.cpp(8281,2): error C2059: syntax error: 'else' 9>D:\Ragnarok\rathena\src\map\battle.cpp(8282,2): error C2143: syntax error: missing ';' before '{' 9>D:\Ragnarok\rathena\src\map\battle.cpp(8282,2): error C2447: '{': missing function header (old-style formal list?) 9>D:\Ragnarok\rathena\src\map\battle.cpp(8298,2): error C2059: syntax error: 'if' 9>D:\Ragnarok\rathena\src\map\battle.cpp(8301,2): error C2059: syntax error: 'else' 9>D:\Ragnarok\rathena\src\map\battle.cpp(8304,2): error C2059: syntax error: 'return' 9>D:\Ragnarok\rathena\src\map\battle.cpp(8304,24): error C2059: syntax error: '-' 9>D:\Ragnarok\rathena\src\map\battle.cpp(8305,1): error C2059: syntax error: '}' 9>D:\Ragnarok\rathena\src\map\battle.cpp(8305,1): error C2143: syntax error: missing ';' before '}' 9>D:\Ragnarok\rathena\src\map\battle.cpp(8312,1): error C2143: syntax error: missing ';' before '{' 9>D:\Ragnarok\rathena\src\map\battle.cpp(8312,1): error C2447: '{': missing function header (old-style formal list?)
On 4/17/2020 at 7:36 PM, Brynner said:oh this is the idea of mine wayback 2016. i think i have that patch file in herc. but you still need to change the map[sd->bl.m to mapflag(sd->bl.m
Can you share your working copy for latest rA version? Thank you
-
Help me to update this patch for latest rA. Thank you
And please add this code to use @pk state on/off only on towns/non-PVP maps
if( map[sd->bl.m].flag.pvp || map[sd->bl.m].flag.gvg || map[sd->bl.m].flag.gvg_castle || map[sd->bl.m].flag.gvg_dungeon ) { clif_displaymessage(fd, "You can only change your PK state on non-PVP maps."); return -1; }
Thank you very much
-
Help me to add guild skill check like Guild "Official Approval Skill" before they enter
prontera,155,188,0 script GuildCheck 910,{ query_sql "SELECT guild_lv FROM guild WHERE guild_id = "+getcharid(2), .@guild_lv; mes "hi bla"; if (getcharid(2) == 0) { mes "You are not in a guild."; } else if (.@guild_lv < 50) { mes "you cant use this service"; mes "Your guild must be level 50."; } else { warp "bla",0,0; } close; }
-
Need help to fix this error
[Error]: buildin_sleep2: no unit is attached [Debug]: Source (NPC): Emperium Breaker at turbo_room (106,105)
This is the script
turbo_room,106,105,5 script Emperium Breaker 1288,{ // What Map will be used set .Map$,"job3_arch01"; // How many Top Breaker will be Recorded set .TopRank,5; // Message to Inform Players while inside the Room setarray .Instruction$[0], "You need a guild to be able to hit the Emperium, create one with the Emperium i have you if you don't have any. Please read carefully.", "This room is to test how quick you can break an Emperium.", "So get prepared, the Emperium will spawn in a few seconds.", "When you enter there, you rill recieve Butterfly Wings so you can return when you finish, be prepared."; while( 1 ){ mes "Emperium Breaker Room to test how quick you destroy it."; mes "You can compare too the records of other players."; next; switch( select( ( getmapusers( .Map$ ) )?"^FF0000No available":"^0000FFAvailable^000000", "Top ^FF0000"+.TopRank+"^000000 Record", ( getgmlevel() < 90 )?"":"^FF0000[GM]^000000 Reset Room", ( getgmlevel() < 90 )?"":"^FF0000[GM]^000000 Reset Ladder" )){ Case 1: if( getmapusers( .Map$ ) ){ mes "There is another player, please wait until the player ends."; next; break; } warp .Map$,0,0; getitem 714,1; // Emperium if they don't have a guild they can easly create one and test on the Emperium Room killmonster .Map$,"All"; // removemapflag .Map$,mf_noskill; donpcevent strnpcinfo(0)+"::OnReady"; end; Case 2: mes "^ED1ADCBest Record^000000 : "+LatestRecord/1000+"."+LatestRecord%1000+" Seconds."; for( set .@i,0; .@i < .TopRank; set .@i,.@i + 1 ){ if( !$TopRankTime[.@i] ) break; mes "^FF0000Top "+( .@i + 1 )+" : ^0000FF"+$TopName$[.@i]+" "; mes "^FF0000Time : ^ED1ADC[ "+$TopRankTime[.@i]/1000+"."+$TopRankTime[.@i]%1000+" Sec. ]^000000 "; } next; break; Case 3: mapannounce .Map$,"El GM reinicio los record del Emperium Breaker.",0,0x00FF00; killmonster .Map$,"All"; sleep2 3000; mapwarp .Map$,"izlude",103,142; mes "Listo, los jugadores que estaban adentro son enviados a fuera."; next; break; Case 4: switch( select( "^0000FFAll Player^000000:^FF0000One Player^000000" ) ){ Case 1: deletearray $TopRankTime[0],getarraysize( $TopRankTime ); deletearray $TopName$[0],getarraysize( $TopName$ ); mes "RESETED WHOLE LADDER."; break; Case 2: mes "Please input the ^FF0000EXACT NAME^000000 of player you want to delete."; input .Name$; for( set .@i,0; .@i < .TopRank; set .@i,.@i + 1 ){ if( .Name$ == $TopName$[.@i] ){ deletearray $TopName$[.@i],1; deletearray $TopRankTime[.@i],1; mes "Removed ^FF0000"+.Name$+"^000000 from the List."; } } } next; break; } } OnReady: sleep2 3000; for( set .@i,0; .@i < getarraysize( .Instruction$ ); set .@i,.@i + 1 ){ mapannounce .Map$,.Instruction$[.@i],0,0x00FF00; sleep2 2500; } for( set .@i,5; .@i > 0; set .@i,.@i - 1 ){ mapannounce .Map$," : "+.@i+" seconds left.",0,0x00FF00; sleep2 1000; } //mapannounce .Map$,"Hit the Emperium Now and Skills Disabled.",0,0x00FF00; setmapflag .Map$,mf_noskill; monster .Map$,29,27,"Breaker Test",1288,1,strnpcinfo(0)+"::OnBreaked"; set .Record,0; sleep2 500; initnpctimer; end; OnTimer600000: if( !mobcount( .Map$,strnpcinfo(0)+"::OnBreaked" ) ) end; mapannounce .Map$,"You spent too much time. i think you are AFK , so you are out.",0,0xED1ADC; sleep2 3000; mapwarp .Map$,"izlude",103,142; stopnpctimer; end; OnBreaked: set .Time,getnpctimer(0); copyarray .@tempName$[0],$TopName$[0],getarraysize( $TopName$ ); copyarray .@tempRecord[0],$TopRankTime[0],getarraysize( $TopRankTime[0] ); set LatestRecord,.Time; for( set .@i,0; .@i < .TopRank; set .@i,.@i + 1 ){ if( .Time < $TopRankTime[.@i] || !$TopRankTime[.@i] ){ set $TopRankTime[.@i],.Time; set $TopName$[.@i],strcharinfo(0); copyarray $TopRankTime[.@i + 1],.@tempRecord[0],getarraysize( .@tempRecord ); copyarray $TopName$[.@i + 1],.@tempName$[0],getarraysize( .@tempName$ ); announce "[ "+strcharinfo(0)+" ] Got the Ranking "+( .@i + 1 )+" on the Emperium Breaker Room with a record of "+.Time/1000+"."+.Time%1000+" seconds !!!",bc_all,0xED1ADC; break; } } stopnpctimer; announce "Time tooked : "+.Time/1000+"."+.Time%1000+" Seconds. ",bc_self,0xED1ADC; // removemapflag .Map$,mf_noskill; sleep2 5000; mapwarp .Map$,"izlude",103,142; //here is the place of the npc end; } job3_arch01 mapflag nocommand 50 job3_arch01 mapflag gvg on job3_arch01 mapflag gvg_castle job3_arch01 mapflag monster_noteleport job3_arch01 mapflag nosave SavePoint
Convert Hit-Delay for latest rA
in Source Requests
Posted
@up