-
Content Count
365 -
Joined
-
Last visited
-
Days Won
4
Posts posted by Litro
-
-
yes try if it generate any error or working as intended
-
isn't that annoying for player and bot (bot checker will fail it mean) can do relog before timer is out to check is kind funny? however try this..
add this to end of script before last closing bracket
OnPCLoadMapEvent: for (.@i = 0; .@i < getarraysize(.map_list$); .@i++) { if (strcharinfo(3) == .map_list$[.@i]) { addtimer .time_tocheck, strnpcinfo(3)+"::On15secs"; break; } } end;On15secs: for (.@i = 0; .@i < getarraysize(.map_list$); .@i++) if (strcharinfo(3) == .map_list$[.@i]) goto check; end;OnInit: .time_tocheck = 15 *1000; setarray .map_list$, "prontera", "payon"; // add the map you want to it triggered for (.@i = 0; .@i < getarraysize(.map_list$); .@i++) setmapflag .map_list$[.@i],mf_loadevent; end;
and in the original script you copas above, add this line
addtimer .time_tocheck, strnpcinfo(3)+"::On15secs";
after this line
percentheal 100,100;
nb: please use code box for the script so it easy to do copy paste
-
OnPCLoadMapEvent: if (strcharinfo(3) == "pvp_n_6-5") { addtimer .timetocheck*1000,strnpcinfo(3)+"::OnCheckItem"; } end;OnCheckItem: for (.@i = 0; .@i < getarraysize(.item_list); .@i++) { if (countitem(.item_list[.@i]) && strcharinfo(3) == "pvp_n_6-5") { mes "[^FF0000 Guard ^000000]"; mes "Sorry "+getitemname(.item_list[.@i])+" is not allowed in here!,"; close2; warp "prontera",150,150; end; } } if (strcharinfo(3) == "pvp_n_6-5") { addtimer .timetocheck*1000,strnpcinfo(3)+"::OnCheckItem"; } end;
-
// Min Members 3, request item gold coin , must be party leader to accept this quest .. map warp flame_dun , waiting room ( Fire Dungeon ) prontera,150,150,1 script Fire Dungeon 100,{ if (getcharid(0) != getpartyleader(getcharid(1),2)) { mes "Only party leader can talk to me"; close; } if (!countitem(.request_item)) { mes "Need "+getitemname(.request_item)+" to go inside"; close; } .@origin = getcharid(3); getpartymember getcharid(1), 1; getpartymember getcharid(1), 2; for ( .@i = 0; .@i < $@partymembercount; .@i++ ) { if ( isloggedin( $@partymemberaid[.@i] , $@partymembercid[.@i] ) ) { attachrid $@partymemberaid[.@i]; .@online++; } } attachrid .@origin; if ( .@online < .min_member ) { mes "your party needs "+.min_member+" party members online to continue."; close; } delitem .request_item, 1; warpparty flame_dun, 150, 150, getcharid(1); end;OnInit: .request_item = Gold_Coin; .min_member = 3; waitingroom strnpcinfo(0),0; end;}
-
not sure why, but i have used it since along ago and it was fine for me, if it were bug maybe you have to report it to dev
-
-
try this if you want to..
- script checkitem -1,{ end;OnPCLoadMapEvent: addtimer .timetocheck*1000,strnpcinfo(3)+"::OnCheckItem"; end;OnCheckItem: for (.@i = 0; .@i < getarraysize(.item_list); .@i++) { if (countitem(.item_list[.@i])) { mes "[^FF0000 Guard ^000000]"; mes "Sorry "+getitemname(.item_list[.@i])+" is not allowed in here!,"; close2; warp "prontera",150,150; end; } } addtimer .timetocheck*1000,strnpcinfo(3)+"::OnCheckItem"; end;OnInit: setarray .item_list, 607, 608; // add item you want to check here .timetocheck = 1; //Seconds after which idle is checked. end;}// Mapflagpvp_n_6-5 mapflag loadevent
Yoh Asakura reacted to this -
AFAIK version at clientinfo.xml is not needed to be manualy configured https://github.com/HerculesWS/Hercules/blob/master/conf/login-server.conf#L73
// Check The clientversion set in the clientinfo ?check_client_version: no
-
I tried to add a npc to block the item but it's still possible to bring the item in the cart (with merchant and alchemist)
Is there anyway to block the item inside the cart?
@edit
Maybe I can add a script that checks each second if a player has this item, this way, when they pick the item from the cart the script will detect.
Who can do the edition to me?
Like the AFK script, but this one to check an item in the inventory...
even the whatever class bring the ygg in the cart they won't be able to use it, that mean your purpose served and don't forget set the items.conf as @@Emistry said above
// Will disabled consumables (disabled by map_zone_db.conf) be consumed when trying to use them?// 1 (official): yes// 0: noitem_restricted_consumption_type: 1// Unequip the equipments that has disabled by map_zone_db.conf ?// 0 : disabled equipments and cards are nullify (official)// 1 : disabled equipments are unequip, disabled cards are nullify// 2 : disabled equipments are nullify, disabled cards will caused the equipment to unequip// 3 : disabled equipments are unequip, disabled cards will caused the equipment to unequip (1+2)unequip_restricted_equipment: 0
https://github.com/HerculesWS/Hercules/blob/master/conf/battle/items.conf
item_restricted_consumption_type: 0 // so your player won't feel scamed using item without feeling the effect
-
// http://rathena.org/board/topic/58835-done-request-ip-check/page__view__findpost__p__80798/*To add more maps:1. add it to this string : set .maps$, "bat_room,anothermap,etc";2. and add the 'loadevent' mapflag on that map : <map name> mapflag loadevent*/// Checking I P when entering a Map and kick if dual .. example map bat_room- script Only1perIP -1,{OnPCLoadMapEvent: set .maps$, "bat_room,anothermap,etc"; set .@my_map$, strcharinfo(3); // check if they are on a "1-per-IP" map if (compare(","+.maps$+"," , ","+.@my_map$+",")) { // look for other online players from the same IP query_sql("SELECT login.account_id FROM login LEFT JOIN `char` ON login.account_id=`char`.account_id " + "WHERE login.last_ip=(SELECT last_ip FROM login WHERE account_id="+getcharid(3)+") " + "AND `char`.online=1 AND login.account_id!="+getcharid(3), .@account_id; for (set .@i,0; .@i<getarraysize(.@account_id); set .@i,.@i+1) { // check if other online players are on the same map getmapxy .@map$,.@x,.@y, 0, rid2name(.@account_id[.@i]); if (.@map$ == .@my_map$) { // kick the new player arriving to map set .@name$, strcharinfo(0); announce "Sorry, only 1 char per IP can be on this map at a time.", bc_self; sleep 1000; atcommand "@kick " + .@name$; } } } end;}bat_room mapflag loadevent
here what i have in my script collection, link can be found on top of script and i think it can be more optimized for your own need
rizkiolivia reacted to this -
try this
for(.@i = 10; .@i > 0; .@i--) { announce ""+.@i,0; waitingroom .@i,0; sleep 1000; delwaitingroom;}
-
-
try change this..
getvariableofnpc(.item,"BringMeEvent")
into this..
getitemname(getvariableofnpc(.item,"BringMeEvent"))
-
got an error on --> .arraysize
and also this
1. .arraysize var is not used so i remove it
2. as @@Garr said, so i make it set when npc got started
Both .@item and .@amount are not set within the script before being called here, so they are 0. That's why you're getting errors.
3. Added rounds setting as requested
//====================ANNOUNCER======================- script Announcer2 -1,{OnGMStart: announce "(BringMeEvent) : A Gamemaster started a Bring Me Event now.",0; sleep 3000; announce "(BringMeEvent) : If you want to join, come at the middle of Prontera",0; .@i = rand( getarraysize(.BringMeItems) ); set getvariableofnpc(.item,"BringMeEvent"), .BringMeItems[.@i]; set getvariableofnpc(.amount,"BringMeEvent"), rand(1,100); set getvariableofnpc(.Round,"BringMeEvent"), 1; enablenpc "BringMeEvent"; announce "(BringMeEvent) : Bring me "+getvariableofnpc(.amount,"BringMeEvent")+"x "+getvariableofnpc(.item,"BringMeEvent"),0; sleep 2000; announce "(BringMeEvent) : Prize: will be TCG and 1x Elite Siege Supply Box",0; sleep 2000; announce "(BringMeEvent) : Hurry Now!.",0; sleep 2000; announce "(BringMeEvent) : GAME STARTED.",0; end;OnGMStop: announce "A Gamemaster has stopped the Bring Me Event",0; disablenpc "BringMeEvent"; end;OnNextRound: .@i = rand( getarraysize(.BringMeItems) ); set getvariableofnpc(.item,"BringMeEvent"), .BringMeItems[.@i]; set getvariableofnpc(.amount,"BringMeEvent"), rand(1,100); announce "(BringMeEvent) : Bring me "+getvariableofnpc(.amount,"BringMeEvent")+"x "+getvariableofnpc(.item,"BringMeEvent"),0; sleep 2000; announce "(BringMeEvent) : Prize: will be TCG and 1x Elite Siege Supply Box",0; sleep 2000; announce "(BringMeEvent) : Hurry Now!.",0; end;OnInit: setarray .BringMeItems[0],501,7227,4001,7005,909,512,714; bindatcmd "startbme",strnpcinfo(3)+"::OnGMStart",90,99; bindatcmd "stopbme",strnpcinfo(3)+"::OnGMStop",90,99; end;}prontera,150,150,0 script BringMeEvent 100,{ if (countitem(.item) < .amount) { mes "You don't have my requirements"; close; } delitem .item, .amount; getitem .p, .a; announce "Yayks! "+strcharinfo(0)+" won the "+.Round+" round event",0; .Round++; if (.Round > .Rounds) disablenpc "BringMeEvent"; else donpcevent "Announcer2::OnNextRound"; end;OnInit: .Rounds = 10; // Set how many round you want here .p = 7227; .a = 5; disablenpc "BringMeEvent"; end;}
-
make admin live easier.. Thx
-
-
welcome to hercules
-
looking forward into it
-
re-diff and set your client to ignore client error
-
Try this, to start type '@startbme', to stop type '@stopbme'
//====================ANNOUNCER======================- script Announcer2 -1,{OnGMStart: announce "(BringMeEvent) : A Gamemaster started a Bring Me Event now.",0; sleep 3000; announce "(BringMeEvent) : If you want to join, come at the middle of Prontera",0; enablenpc "BringMeEvent"; sleep 2000; announce "(BringMeEvent) : Prize: will be TCG and 1x Elite Siege Supply Box",0; sleep 2000; announce "(BringMeEvent) : Hurry Now!.",0; sleep 2000; announce "(BringMeEvent) : GAME STARTED.",0; end; OnGMStop: announce "A Gamemaster has stopped the Bring Me Event",0; disablenpc "BringMeEvent"; end;OnInit: bindatcmd "startbme",strnpcinfo(3)+"::OnGMStart",90,99; bindatcmd "stopbme",strnpcinfo(3)+"::OnGMStop",90,99; end;}prontera,150,150,0 script BringMeEvent 100,{ if (countitem(.item) < .amount) { mes "You don't have my requirements"; close; } delitem .item, .amount; getitem .p, .a; announce "Yayks! " + strcharinfo(0) + " won the event",0; disablenpc "BringMeEvent"; end; .@i = rand( getarraysize(.BringMeItems) ); .item = .BringMeItems[.@i]; .amount = rand(1,100); announce "Bring me " +.amount+ "x " +getitemname(.item ),0; enablenpc "BringMeEvent"; end;OnInit: setarray .BringMeItems[0],501,7227,4001,7005,909,512,714; .arraysize, getarraysize(.BringMeItems); .p = 7227; .a = 5; disablenpc "BringMeEvent"; end;}
-
try change code in this part
// Shop NPCs -- supplying no argument displays entire menu.// callfunc "qshop"{,<shop ID>{,<shop ID>{,...}}};//============================================================prontera,164,203,6 script Quest Shop#1 4_M_MOCASS2,{ callfunc "qshop"; }
callfunc "qshop"{,<shop ID>{,<shop ID>{,...}}}; make it like this
prontera,164,203,6 script Quest Shop#1 4_M_MOCASS2,{ callfunc "qshop",1; }
it will automaticaly open first category shop without generating category menu, AFAIK CMIIW
-
prontera,164,174,4 script Freebies 123,{ mes "[Hello]"; if (#Freebie) { mes "You have claimed your freebies already"; close; } mes "[I can give you a free gift based on your future job.]"; mes "[Please choose the correct item for the future job]"; mes "Select one:"; next; switch(select("Str:Agi:Vit:Int:Dex")) { case 1: getitem 25000,1; break; case 2: getitem 22003,1; getitem 35006,1; //Item for Agi break; case 3: getitem 22004,1; getitem 35007,1; //Item for Vit break; case 4: getitem 22001,1; getitem 35002,20; //Item for int break; case 5: getitem 22002,1; getitem 35004,1; //Item for Dex break; } #Freebie = 1; close; }OnInit: waitingroom "Get your freebies here ! ",0; end;}
-
i have faced it long time ago, try reformating the image with photoshop may be it corrupted, or try with other image and rename it
-
is this part of script ?, used variable is attached temporary to character, post entire script
as for part 'Team leader register but it say you are not team leader .', change this part code
if ( getcharid(0) != CID[@MnF] ) {mes "You are not the Teamleader!";close;}
to this
if ( getcharid(0) != getpartyleader(getcharid(1),2) ) {mes "You are not the Teamleader!";close;}
I want to deequip armors with +8refine and above in specific map. How?
in Source Support
Posted
for 'if you try to equip armor with above refine in the map, it will not equip' i think it need source edit like mapflag custom, but idk about src and if you want to try this script.. the different is this script will check every configured second (i set default 1 sec) on the selected map you set and if it refine count is higher than script .max_refine set it will unequip..
Litro.