Jump to content

Zalbahis

Members
  • Content Count

    26
  • Joined

  • Last visited

Posts posted by Zalbahis


  1. Hello Hercules!..

    So I am having problems regarding with the vending control script of Emistry from rA. Can someone point out me what is the problem with the script.. Btw, I am using the latest Hercules SVN..

     

    Map Server Image

    2h39b3a.png

     

    Vend Control Script

    -	script	Vend Control	-1,{OnInit:sleep 1000;// Map for vendingset .map$,"rachel";setcell .map$,0,0,284,365,cell_novending,1;// x and y horizone ..setarray .x_line,142,147,152,157;setarray .y_line,166,170,174,178,182,186,190;set .x_line_size,getarraysize( .x_line );set .y_line_size,getarraysize( .y_line );set .count,1;for( set .@x,0; .@x < .x_line_size; set .@x,.@x + 1 )	for( set .@y,0; .@y < .y_line_size; set .@y,.@y + 1 )		if( checkcell( .map$,.x_line[.@x],.y_line[.@y],cell_chkpass ) ){			movenpc "#vend_slot"+.count,.x_line[.@x],.y_line[.@y];			setcell .map$,.x_line[.@x],.y_line[.@y],.x_lin[.@x],.y_line[.@y],cell_novending,0;			set .count,.count + 1;		}npctalk "Vending Spot : "+.count;donpcevent "::OnSetup";end;}-	script	vend_slot	-1,{getmapxy( .@map$,.@x,.@y,1 );if( !getskilllv("MC_VENDING") ){	mes "You dont have ^0055FFVending Skill^000000.";}else if( getareausers( .@map$,.@x,.@y,.@x,.@y ) ){	mes "Someone already selected this spot.";}else{	mes "Spot : ^FF0000Available^000000";	mes "^0055FF[ Vending Area Rules ]^000000";	mes "^FF0000~ Use proper Shop Name.^000000";	mes "^FF0000~ Never sell Junk/Gifts.^000000";	mes " ";	mes "^777777Player will failed to follow these will be punished.^000000";	if( select( "Select this Spot","Cancel" ) == 1 ){		warp .@map$,.@x,.@y;		hideonnpc strnpcinfo(0);	}}close;OnSetup:getmapxy( .@map$,.@x,.@y,1 );set .@npcname$,strnpcinfo(0);while( 1 ){	if( getareausers( .@map$,.@x,.@y,.@x,.@y ) ){		hideonnpc .@npcname$;	}else{		hideoffnpc .@npcname$;		// specialeffect 313;	}	sleep 5000;}end;}// Add more if needed.rachel,1,1,4	duplicate(vend_slot)	#vend_slot1	858rachel,1,1,4	duplicate(vend_slot)	#vend_slot2	858rachel,1,1,4	duplicate(vend_slot)	#vend_slot3	858rachel,1,1,4	duplicate(vend_slot)	#vend_slot4	858rachel,1,1,4	duplicate(vend_slot)	#vend_slot5	858rachel,1,1,4	duplicate(vend_slot)	#vend_slot6	858rachel,1,1,4	duplicate(vend_slot)	#vend_slot7	858rachel,1,1,4	duplicate(vend_slot)	#vend_slot8	858rachel,1,1,4	duplicate(vend_slot)	#vend_slot9	858rachel,1,1,4	duplicate(vend_slot)	#vend_slot10	858rachel,1,1,4	duplicate(vend_slot)	#vend_slot11	858rachel,1,1,4	duplicate(vend_slot)	#vend_slot12	858rachel,1,1,4	duplicate(vend_slot)	#vend_slot13	858rachel,1,1,4	duplicate(vend_slot)	#vend_slot14	858rachel,1,1,4	duplicate(vend_slot)	#vend_slot15	858rachel,1,1,4	duplicate(vend_slot)	#vend_slot16	858rachel,1,1,4	duplicate(vend_slot)	#vend_slot17	858rachel,1,1,4	duplicate(vend_slot)	#vend_slot18	858rachel,1,1,4	duplicate(vend_slot)	#vend_slot19	858rachel,1,1,4	duplicate(vend_slot)	#vend_slot20	858rachel,1,1,4	duplicate(vend_slot)	#vend_slot21	858rachel,1,1,4	duplicate(vend_slot)	#vend_slot22	858rachel,1,1,4	duplicate(vend_slot)	#vend_slot23	858rachel,1,1,4	duplicate(vend_slot)	#vend_slot24	858rachel,1,1,4	duplicate(vend_slot)	#vend_slot25	858rachel,1,1,4	duplicate(vend_slot)	#vend_slot26	858rachel,1,1,4	duplicate(vend_slot)	#vend_slot27	858rachel,1,1,4	duplicate(vend_slot)	#vend_slot28	858

    Thank you in advance and more power to Hercules !


  2. This script is really buggy during the conflict of OnClock..

     

    Example: this npc starts at this time..

    OnClock0000:

    OnClock0010:

    Rounds: 5

     

    Scenario

    OnClock0000: The player just answered 1 - 4 round and leaves without finishing the Event will still count on the nxt time the npc trigger..

    OnClock0010: Assuming that the previous player has answered 4 rounds and there's a lacking of 1 more round.

    The NPC Start time still conflicting with the previous Time it starts [ OnClock0000 ]..

    so OnClock0010 will only do 1 round..

     

    so I would like to ask if there's a way of this script to be at only 15-30mins per Event, so it'll stop from conflicting from the previous Time it start..

     

    Here's the customized script, credits to the creator of this script :)

    //===== Hercules Script ======================================//= Disguise Event//===== By: ==================================================//= GmOcean//===== Current Version: =====================================//= 5.1//===== Compatible With: ===================================== //= Hercules//===== Additional Comments: =================================  //= Note: This script requires PCRE to run properly.//= 5.0 Last update by GmOcean.//= 5.1 Cleaned and standardized, mostly. [Euphy]//============================================================-	script	Disguise#Announcer	-1,{OnInit:	disablenpc "disguise#event";	disablenpc "Disguise Event";	end;OnClock0144:OnClock0147:	announce "Dice: We are going to have a Dice Event.",0;	enablenpc "disguise#event";	sleep2 10000;	announce "Dice: For those who wants to join, Please proceed to rachel,112,99 and enter the Warp Portal.",0;	sleep2 10000;	announce "Dice: After 1 Minute the Portal will close.",0;	sleep2 10000;	announce "Dice: So please go to rachel,112,99 and enter the Warp Portal now if you want to join.",0;	enablenpc "Disguise Event";	donpcevent "Disguise Event::OnEnable";	initnpctimer;	end;}gon_test,57,95,4	script	Disguise Event	795,{	set .@GMLevel,90;	// GM level required to access NPC.	set .@n$,"[^0000FFDisguise NPC^000000]";	if (getgmlevel()>=.@GMLevel) {		mes .@n$;		mes "Select an option.";		next;		switch(select("Turn ON/OFF Event:Event Settings")) {		case 1:			mes .@n$;			if (.EventON) {				mes "The Event is currently: [^0000FFON^000000]";				mes "Would you like to turn it OFF?";			} else {				mes "The Event is currently: [^FF0000OFF^000000]";				mes "Would you like to turn it ON?";			}			if(select("Yes:No")==2) close;			if (.EventON) {				set .EventON,0; set .Timer,0;				setnpctimer 0; stopnpctimer;				announce "A GM has decided to turn the Disguise Event off. As a result no further prizes will be given.",bc_map | bc_blue;				deletepset 1;				setnpcdisplay "Disguise Event",795;				close;			}			set .EventON,1; set .Timer,1; setnpctimer 0; initnpctimer;			set .ResetCounter,.ResetCounter+1;			announce "The Disguise Event will begin in 3 minutes.",bc_all | bc_blue;			announce "The Event is being held in Prontera.",bc_all | bc_blue;			close;		case 2:			mes .@n$;			mes "Pick a setting to modify.";			next;			switch(select("Monster Display:Number of Rounds:Prize Settings")) {			case 1:				setarray .@r$[0],"Disguise as all monsters.","Disguise as MVPs only.";				mes .@n$;				mes "Choose a disguise rule.";				next;				set .Rule, select(implode(.@r$,":"));				mes .@n$;				mes "The Disguise Rule has been set:";				mes "  > ^0055FF"+.@r$[.Rule-1]+"^000000";				close;			case 2:				mes .@n$;				mes "Input the number of rounds you want the event to last.";				mes "Current number: [^0000FF"+.Rounds+"^000000]";				next;				input .@Rounds;				set .Rounds,.@Rounds;				mes .@n$;				mes "The number of rounds has been changed to "+.Rounds+".";				close;			case 3:				mes .@n$;				mes "Input the Item ID of the prize given each round.";				mes "Current item: [^0000FF"+getitemname(.Prize)+"^000000] (ID #"+.Prize+")";				next;				input .@Prize;				mes .@n$;				if (getitemname(.@Prize)=="" || getitemname(.@Prize)=="null") {					mes "That item does not exist. Please try again.";					close;				}				set .Prize,.@Prize;				mes "Input the amount to be given.";				next;				input .@amount;				mes .@n$;				if (.@amount<=0 || .@amount>=10000) {					mes "That amount is invalid. Using default ammount of 1.";					set .@amount,1;					next;					mes .@n$;				}				set .PrizeAmt,.@amount;				mes "The Prize has been changed successfully.";				mes "Prize: "+.PrizeAmt+"x [^0000FF"+getitemname(.Prize)+"^000000]";				close;			}		}	}	if (.EventON) end;	mes .@n$;	mes "Welcome.";	mes "How may I be of assistance?";	if(select("Information:Nothing, just passing through.")==2) close;	next;	mes .@n$;	mes "This event is quite simple.";	mes "At the start of the event, I will";	mes "disguise myself as a random";	mes "monster. You have to shout";	mes "that monter's name out loud.";	next;	mes "If you are correct, you will receive";	mes "a prize. If not, keep trying!";	mes "That's all that there is to this event.";	close;OnInit:	set .EventON,0;	set .Wait,0;	set .Winner,0;	set .ResetCounter,0;	set .Rounds,5;	set .Prize,6418;	set .PrizeAmt,5;	set .Rule,1;	setarray .MVP[0],1038,1039,1046,1059,1086,1087,1112,1115,1147,1150,1157,1159,1190,1251,1252,1272,1312,1373,	                  1389,1399,1418,1492,1502,1511,1583,1623,1630,1646,1647,1648,1649,1650,1651,1658,1685,1688,				   1708,1719,1734,1751,1768,1779,1785,1802,1832,1871,1874,1885,1917,1980,2022,2068,2087,2131,				   2156,2165;	set .BlackList$, "1003,1006,1017,1021,1022,1027,1043,1075,1136,1137,1168," + 	    "1171,1172,1173,1181,1187,1210,1217,1218,1222,1223,1224,1225,1226,1227,1228," + 	    "1233,1284,1407,1411,1414,1495,1501,1900,1996,2000,2001,2002,2003,2004," + 	    "2005,2006,2007,2011,2012,2025,2028,2029,2030,2031,2032,2033,2034,2035," + 	    "2036,2037,2038,2039,2040,2041,2042,2043,2044,2045,2046,2047,2048,2049," + 	    "2050,2051,2052,2053,2054,2055,2056,2057,2058,2059,2060,2061,2062,2063," + 	    "2064,2065,2066,2067,2075,2076,2077,2078,2079,2080,2081,2083,2084,2085," + 	    "2086,2087,2088,2089,2090,2091,2092,2093,2094,2095,2096,2097,2098,2099," + 	    "2100,2101,2012,2103,2104,2105,2106,2107,2108,2109,2110,2111,2112,2113," + 	    "2114,2115,2116,2117,2118,2119,2120,2121,2123,2124,2125,1496,";	end;OnEnable:	set .ResetCounter,.ResetCounter+1;	set .EventON,1;	set .Timer,1;	set .Wait,1;	announce "The Disguise Event will begin in 1 minute.",bc_all | bc_blue;	setnpctimer 0;	initnpctimer;	end;OnTimer10000:	if (.Timer || .Change) end;	set .Wait,0;	goto iDisguise;	end;OnTimer30000:	if (.Timer) end;	set .Change,0;	setnpcdisplay "Disguise Event",795;	npctalk "You took too long to guess what I was. Please wait 10 seconds while I disguise again.";	specialeffect 725;	set $MonsterName$,"";	deletepset 1;	stopnpctimer;	setnpctimer 0;	initnpctimer;	end;OnTimer30001:	if (.Timer!=1) end;	announce "Dice: Last 30 seconds.",bc_all | bc_blue;	end;OnTimer50000:	if (.Timer!=1) end;	announce "Dice: Last 10 seconds.",bc_all | bc_blue;	end;OnTimer55000:	if (.Timer!=1) end;	announce "Dice: 5.",bc_all | bc_blue;	end;OnTimer56000:	announce "Dice: 4.",0;	end;	OnTimer57000:	announce "Dice: 3.",0;	end;	OnTimer58000:	announce "Dice: 2.",0;	end;	OnTimer59000:	announce "Dice: 1.",0;	end;	OnTimer60000:	announce "Dice: Time's up.",0;	end;	OnTimer61000:	disablenpc "disguise#event";	set .Timer,0; stopnpctimer;	setnpctimer 0; initnpctimer;	end;	OnTimer62000:	announce "Dice: Time's up. Portal will open again in 4 hours.",0;	end;iDisguise:	if (.Rule==1) {		set .Winner,0;		set .Monster,1000+rand(1,995);		if (compare(","+.BlackList$+"," , ","+.Monster+",")) goto iDisguise;		if (.Monster==.LastMonster) goto iDisguise;		set .LastMonster,.Monster;		set $MonsterName$,getmonsterinfo(.Monster,0);	}	if (.Rule==2) {		set .Winner,0;		set .Monster,rand(49);		set $MonsterName$,getmonsterinfo(.MVP[.Monster],0);	}	deletepset 1;	defpattern 1,"([^:]+):.s*"+$MonsterName$+".*", "iCorrect";	activatepset 1;	if (.Rule==1) setnpcdisplay "Disguise Event",.Monster;	if (.Rule==2) setnpcdisplay "Disguise Event",.MVP[.Monster];	set .Change,1;	setnpctimer 0;	end;iCorrect:	if (.Winner) {		dispbottom "Someone has already won this round.";		end;	}	set .Winner,1;	set .RoundCount,.RoundCount+1;	deletepset 1;	activatepset 1;	getitem .Prize,.PrizeAmt;	announce strcharinfo(0)+" is correct! I was disguised as: "+$MonsterName$+"",bc_map | bc_blue;	if (.RoundCount>=.Rounds) {		setnpcdisplay "Disguise Event",795;		set .RoundCount,0; set .Change,0; set .EventON,0;		setnpctimer 0; stopnpctimer;		npctalk "Thank you all for playing. That was the last round of the Disguise Event. Come play again later.";		end;	}	setnpcdisplay "Disguise Event",795;	set .Change,0;	setnpctimer 0;	end;}rachel,112,99,0	warp	disguise#event	1,1,gon_test,45,86

    PS: Sorry for my bad explanation :(

    Thanks in advance..


  3. Yeah i know that, but its really weird that the map server is not showing any errors, I even type random words just to make make the map server read its errors and still nothing happens :(..

     

    I also link it to right location and double check it..


  4. Can Someone check this Poring Catcher why it isn't working or readable by Hercules Emulator..
    I just dunu why.. and I haven't touch anything to it..

     

    here's the script
     

    //=========== PORING CATCHER MADE ==============//=== BY: SHOGS-GFX and RAGNAROK DEVELOPERS ====//= Please Report if you encounter some errors =//===== https://www.facebook.com/ShogsGfx ======//==============================================//==FUNCTIONS===================================/* GM Can start the event manualy   GM Can also stop the event manualyHOW: just PM this npc (npc:pcatch)The Next Guide Will Be Given by the Manager 	*///======= PLEASE DO NOT REMOVE CREDITS =========//==============================================//== MORE UPDATES TO COME FOR BETTER FUNCTION ==//===== https://www.facebook.com/ShogsGfx ======//==============================================//====LEVEL OF GM CAN CONTROL THE EVENT=========-	script	GMCONTROL	-1,{OnInit:set $gmcontrol,60;end;}//---------------END OF SETUP-------------------//================ON WHISPER=========================-	script	pcatch	-1,{//====LEVEL OF GM CAN CONTROL THE EVENT=========//OnInit://set $gmcontrol,60;//end;//---------------END OF SETUP-------------------OnWhisperGlobal:if(getgmlevel() >= $gmcontrol) {mes "^3399FF[Poring Catcher]^000000";	mes "Hello GameMaster!";mes "What do you want to do?";switch(select("Start Event:Stop Event:Nothing")){	case 1: 	{		next;		mes "^3399FF[Poring Catcher]^000000";		mes "Please confirm by typing START."; 		input .@confirm$;          		if (.@confirm$ == "START") 		{			donpcevent "Announcer2::OnGMStart"; 			close;		}		mes "Confirmation failed";		close;		break;	}	case 2:	{		next;		mes "^3399FF[Poring Catcher]^000000";		mes "Please confirm by typing STOP."; 		input .@confirm$;          		if (.@confirm$ == "STOP") 		{			donpcevent "Announcer2::OnGMStop";			close;		}		mes "Confirmation failed";		close;		break;			}						case 3:	{		next; mes "^3399FF[Poring Catcher]^000000";		mes "Good bye"; 		close;	}}}}//====================ANNOUNCER======================-	script	Announcer2	-1,{OnGMStart:	killmonster "poring_w01.gat","All";	announce "(Poring Manager) : A Gamemaster started a Poring Catcher Event now.",0;	sleep 3000;	announce "(Poring Manager) : If you want to join, come at the middle of Prontera, enter the warp portal.",0;	enablenpc "PoringCatcher";	sleep 2000;	announce "(Poring Manager) : Prize: will be TCG and Gold Coins",0;	sleep 2000;	announce "(Poring Manager) : The portal is going to close in one minute.",0;  	sleep 60000;	announce "(Poring Manager) : The portal has been closed.",0;	disablenpc "PoringCatcher";	if(getmapusers("poring_w01") == 0) 	{		disablenpc "Poring Banker";		announce "Event Poring Catcher didn't start because there's no players.",0;		end;	}	donpcevent "Poring Banker::OnEnable";	end;OnGMStop:	killmonster "poring_w01.gat","All";	announce "A Gamemaster has stopped the Poring Catcher Event",0;	mapwarp "poring_w01.gat","prontera.gat",155,173;	disablenpc "Poring Banker";	disablenpc "PoringCatcher";	end;OnClock1200:OnClock1100:OnClock1300:OnClock2300:	killmonster "poring_w01.gat","All";	announce "(Poring Manager) : Poring Catcher Event will start at the moment.",0;	sleep 3000;	announce "(Poring Manager) : If you want to join, come at the middle of Prontera, enter the warp portal.",0;	enablenpc "PoringCatcher";	sleep 2000;	announce "(Poring Manager) : Prize: will be TCG and Gold Coins",0;	sleep 2000;	announce "(Poring Manager) : The portal is going to close in one minute.",0;  	sleep 60000;	announce "(Poring Manager) : The portal has been closed.",0;	disablenpc "PoringCatcher";	if(getmapusers("poring_w01") == 0) 	{		disablenpc "Poring Banker";		announce "Event Poring Catcher didn't start because no players found in map.",0;		end;	}	donpcevent "Poring Banker::OnEnable";	end;OnInit:	disablenpc "Poring Banker";	disablenpc "PoringCatcher";}//---------All Job Registration----------------------------------------prontera,155,173,0	warp	PoringCatcher	2,2,poring_w01,105,128//---------------------------------------------------------------------//----------------------------------------------------------------------	script	Poring Banker	-1,{OnEnable:mapannounce "poring_w01","Poring Manager: The Poring Catcher Event will start shortly",0;sleep2 10000;mapannounce "poring_w01","Poring Manager: I will be summoning 100 porings with different names kill the real poring",0;sleep2 10000;mapannounce "poring_w01","Poring Manager: What are we waiting for?..Let's Catch some Porings!!...",0;sleep2 10000;goto L_Start;end;L_Start:	if(getmapusers("poring_w01") == 0) goto L_None;	if(getmapusers("poring_w01") >= 1) {	mapannounce "poring_w01","Poring Manager: Get ready at the count of 5 we will start!....",0;	sleep2 6000;	mapannounce "poring_w01","Poring Manager: 5",0;	sleep2 5000;	mapannounce "poring_w01","Poring Manager: 4",0;	sleep2 4000;	mapannounce "poring_w01","Poring Manager: 3",0;	sleep2 3000;	mapannounce "poring_w01","Poring Manager: 2",0;	sleep2 2000;	mapannounce "poring_w01","Poring Manager: 1",0;	donpcevent "Poringsummoner::OnSummon";	end;	}	L_None:	disablenpc "Poring Banker";	killmonster "poring_w01.gat","All";	end;}//==================SUMMONER OF PORINGS ======================-	script	Poringsummoner	-1,{OnSummon:   if(getmapusers("poring_w01") == 0) goto L_2None;   monster "poring_w01.gat",0,0,"Poring",1002,1,"poringwin::OnMobKilled";   monster "poring_w01.gat",0,0,"Pouring",1002,10,"poringlose::OnMobKilled";   monster "poring_w01.gat",0,0,"Proing",1002,10,"poringlose::OnMobKilled";   monster "poring_w01.gat",0,0,"Poirng",1002,10,"poringlose::OnMobKilled";   monster "poring_w01.gat",0,0,"Poing",1002,10,"poringlose::OnMobKilled";   monster "poring_w01.gat",0,0,"I'm not a Poring",1002,5,"poringlose::OnMobKilled";   monster "poring_w01.gat",0,0,"Gnirop",1002,1,"poringlose::OnMobKilled";   monster "poring_w01.gat",0,0,"Poring",1113,1,"poringlose::OnMobKilled";   monster "poring_w01.gat",0,0,"Poring",1062,1,"poringlose::OnMobKilled";   monster "poring_w01.gat",0,0,"Por|ng",1002,10,"poringlose::OnMobKilled";   monster "poring_w01.gat",0,0,"Por1ng",1002,10,"poringlose::OnMobKilled";   monster "poring_w01.gat",0,0,"Porong",1002,10,"poringlose::OnMobKilled";   monster "poring_w01.gat",0,0,"P0ring",1002,10,"poringlose::OnMobKilled";   monster "poring_w01.gat",0,0,"P@ring",1002,10,"poringlose::OnMobKilled";   monster "poring_w01.gat",0,0,"Porng",1002,1,"poringlose::OnMobKilled";end;L_2None:disablenpc "Poring Banker";killmonster "poring_w01.gat","All";end;}//==================REAL PORING FOR WIN======================-	script	poringwin	-1,{OnMobKilled:   killmonster "poring_w01.gat","All";   atcommand "@doommap";   getitem 7227,1;   getitem 671, 10;   announce "Poring Banker: We have a winner! well done " + strcharinfo(0) + ".",0;   warp "SavePoint",0,0;   end;}//==================DUMY PORINGS FOR LOSERS======================-	script	poringlose	-1,{OnMobKilled:   dispbottom "Your out of the game, You did not catch the right Poring !";   percentheal -99,-99;   warp "SavePoint",0,0;   end;}//==================Mapflags========================poring_w01	mapflag	nowarpporing_w01	mapflag	nowarptoporing_w01	mapflag	noteleportporing_w01	mapflag	nosaveporing_w01	mapflag	nomemoporing_w01	mapflag	nobranchporing_w01	mapflag	nolootporing_w01	mapflag	noskillporing_w01	mapflag	nopenalty

     

    I also tested it on the past Hercules Emulator and still has the problem @_@..


  5. I'm requesting for a MVP Hunting Points..

    Every MVP gives points to its killer depending on the MVP difficulty..

     

    Example:

    Phreeoni = 1 Point

    Baphomet = 2 Points

    Thanatos = 5 Points

    etc....

     

    I hope that, it explains well..

    Thank you in advance and more power to Hercules Devs.

     

    PS: Or just 1 Point per MVP kill if you don't have the script above ^_^..


  6. Can Anyone take a look of this, is there a way for this to be, Auto Team Balance upon Joining BG?.. or in Registration?..
    Here's the script.. Originally from eAthena and seem to work on Hercules..

     

    Original Script..

    http://www.eathena.ws/board/index.php?showtopic=255789

     

    My Current Script, this is on Team Deathmatch Battleground..

    // ==============================================================================// BattleGround System - Flavius TD - Flavius Team Deathmatch// ==============================================================================// By Suke / s4zuk3// ==============================================================================// Registration NPC's// *********************************************************************jupe_ele,39,57,4	script	Registration::Fl1R_Guillaume	418,{	end;OnInit:	waitingroom "Team Battle",4,"Flavius_BG1::OnGuillaumeJoin",1;	end;OnEnterBG:	set $@FlaviusBG1_id1, waitingroom2bg("bat_b01",390,10,"Flavius_BG1::OnGuillaumeQuit","");	end;}jupe_ele,46,57,4	script	Registration::Fl1R_Croix	414,{	end;OnInit:	waitingroom "Team Battle",4,"Flavius_BG1::OnCroixJoin",1;	end;OnEnterBG:	set $@FlaviusBG1_id2, waitingroom2bg("bat_b01",10,290,"Flavius_BG1::OnCroixQuit","");	end;}// Battleground Engine// *********************************************************************-	script	Flavius_BG1	-1,{	end;OnInit:	disablenpc "Guillaume Vintenar#fl1";	disablenpc "Croix Vintenar#fl1";	disablenpc "Therapist in battle#fl11";	disablenpc "Therapist in battle#fl12";	end;OnGuillaumeQuit:OnCroixQuit:    if($@FlaviusBG1 != 1) {end;}    if(Bat_Team == 2) {    for(set .@i,0; .@i < getarraysize($@bg_red$); set .@i,.@i+1){    if($@bg_red$[.@i] == strcharinfo(0)) {break;}    }    deletearray $@bg_red$[.@i],1;    set $@td_a,$@td_a-1;    end;    } else if(Bat_Team == 1) {    for(set .@i,0; .@i < getarraysize($@bg_blue$); set .@i,.@i+1){    if($@bg_blue$[.@i] == strcharinfo(0)) {break;}    }    deletearray $@bg_blue$[.@i],1;    set $@td_b,$@td_b-1;    end;    }    else { end; }	end;	OnGuillaumeJoin:OnCroixJoin:		if( $@FlaviusBG1 == 1 ){	if( $@Guill < 30 && $@Croi < 30){	set .@Guillaume, getwaitingroomstate(0,"Fl1R_Guillaume");	set .@Croix, getwaitingroomstate(0,"Fl1R_Croix");	if (.@Guillaume!=0 && .@Croix!=0){	set $@Guill, ($@Guill + 1);	set $@Croi, ($@Croi + 1);	waitingroom2bg_single($@FlaviusBG1_id1,"bat_b01",311,224,"Fl1R_Guillaume");	waitingroom2bg_single($@FlaviusBG1_id2,"bat_b01",87,75,"Fl1R_Croix");	mapannounce "jupe_ele","Battleground -- Team Deathmatch [80-99] G: " + $@Guill + "/30, C: " + $@Croi + "/30 in Progress!!",1,0x006400;		end;	}	}	}	if( $@FlaviusBG1 == 0 ){		donpcevent "Flavius_BG1::OnReadyCheck";		end;	}OnReadyCheck:	if( $@FlaviusBG1 )		end;	set .@Guillaume, getwaitingroomstate(0,"Fl1R_Guillaume");	set .@Croix, getwaitingroomstate(0,"Fl1R_Croix");	    	if( .@Guillaume < 3 || .@Croix < 3 ){		if( .@Guillaume >=4  && .@Croix >=4 && !agitcheck() && $@FLTD_Flood < gettimetick(2) )     {    announce "Battleground -- Team Deathmatch [ B ]: " + .@Guillaume + "/3, [ R ]: " + .@Croix + "/3",bc_all,0x006400;    set $@FLTD_Flood, gettimetick(2) + 15;     end;    }		mapannounce "jupe_ele","Battleground -- Team Deathmatch [ B ]: " + .@Guillaume + "/3, [ R ]: " + .@Croix + "/3",1,0x006400;		end;	}	//			// BG Variables	set $@FlaviusBG1, 1;	set $@FlaviusBG1_Victory, 0;	set .Guillaume_Score, 1;	set .Croix_Score, 1;	// Prepare NPC	donpcevent "#gfl1_respawn::OnBGStart";	donpcevent "#cfl1_respawn::OnBGStart";	enablenpc "Therapist in battle#fl11";	enablenpc "Therapist in battle#fl12";	disablenpc "Guillaume Vintenar#fl1";	disablenpc "Croix Vintenar#fl1";	// Build and Warp Teams	donpcevent "Fl1R_Guillaume::OnEnterBG";	donpcevent "Fl1R_Croix::OnEnterBG";	// Vamos contando :3	set $@Guill, 10;	set $@Croi, 10;	announce "Battleground -- Team Deathmatch has started!",0,0x006400;	initnpctimer;	// Death!!OnRoundStart:	if( $@FlaviusBG1 != 1 ) end;	bg_updatescore "bat_b01",.Guillaume_Score,.Croix_Score;	areapercentheal "bat_b01",382,2,397,17,100,100;	areapercentheal "bat_b01",2,282,17,297,100,100;	bg_warp $@FlaviusBG1_id1,"bat_b01",311,224;	bg_warp $@FlaviusBG1_id2,"bat_b01",87,75;	sleep 2000;	if( $@FlaviusBG1 != 1 ) end;	mapannounce "bat_b01","Team Deathmatch has begun!!",1,0x006400;	bg_updatescore "bat_b01",.Guillaume_Score,.Croix_Score;	end;OnPCDieEvent:	if( $@FlaviusBG1 == 1 )	{	    getmapxy (mapname$,.@mapx,.@mapy,0,strcharinfo(0));	    if ( mapname$ != "bat_b01") end;	     if( Bat_Team == 1) {	     set .Croix_Score, .Croix_Score -1;	     bg_updatescore "bat_b01",.Guillaume_Score,.Croix_Score;	     if (.Croix_Score < 1) donpcevent "Flavius_BG1::OnCroixTDWin";	     end;	     }	     if ( Bat_Team == 2) {         set .Guillaume_Score, .Guillaume_Score -1;         bg_updatescore "bat_b01",.Guillaume_Score,.Croix_Score;         if (.Guillaume_Score < 1) donpcevent "Flavius_BG1::OnGuillaumeTDWin";         end;         }    }end;OnGuillaumeTDWin:	set $@FlaviusBG1, 2;	set $@FlaviusBG1_Victory, 1;	mapannounce "bat_b01","The Blue Team has won the Team Deathmatch",1,0x0000FF;	stopnpctimer;	sleep 2000;	donpcevent "Flavius_BG1::OnMatchEnd";	end;	OnCroixTDWin:	set $@FlaviusBG1, 2;	set $@FlaviusBG1_Victory, 2;	mapannounce "bat_b01","The Red Team has won the Team Deathmatch",1,0xFF0000;	stopnpctimer;	sleep 2000;	donpcevent "Flavius_BG1::OnMatchEnd";	end;	OnTimer900000:    if ($@FlaviusBG1 != 1) end;	mapannounce "bat_b01","Team Deathmatch will ends in 5 minutes",1,0x006400;	end;OnTimer1140000:    if ($@FlaviusBG1 != 1) end;	mapannounce "bat_b01","Team Deathmatch will ends in 1 minute",1,0x006400;	end;OnTimer1200000:    if ($@FlaviusBG1 != 1) end;  	if( .Croix_Score > .Guillaume_Score )	{		mapannounce "bat_b01","The Croix army has won the Battle of Flavius Team Deathmatch!",1,0xFF0000;		donpcevent "Flavius_BG1::OnCroixTDWin";	}	else if( .Croix_Score < .Guillaume_Score )	{		mapannounce "bat_b01","The Guillaume army has won the Battle of Flavius Team Deathmatch!",1,0x0000FF;		donpcevent "Flavius_BG1::OnGuillaumeTDWin";	}	else	{		mapannounce "bat_b01","The Battle of Flavius Team Deathmatch is over. The time is out, this is a Tie",1,0x006400;		set $@FlaviusBG1, 2;		set $@FlaviusBG1_Victory, 3;		stopnpctimer;		sleep 2000;	}	OnMatchEnd:		donpcevent "#gfl1_respawn::OnBGStop";	donpcevent "#cfl1_respawn::OnBGStop";	disablenpc "Therapist in battle#fl11";	disablenpc "Therapist in battle#fl12";	enablenpc "Guillaume Vintenar#fl1";	enablenpc "Croix Vintenar#fl1";	bg_warp $@FlaviusBG1_id1,"bat_b01",390,10;	bg_warp $@FlaviusBG1_id2,"bat_b01",10,290;	deletearray $@bg_red$;    deletearray $@bg_blue$;    set $@td_a,0;    set $@td_b,0;	sleep 3000;	mapannounce "bat_b01","Battle of Flavius Team Deathmatch will close in 1 minute!",1,0x006400;	initnpctimer;	end;OnTimer30000:	if( $@FlaviusBG1 == 2 )		mapannounce "bat_b01","Battle of Flavius Team Deathmatch will close in 30 seconds!",1,0x006400;	end;OnTimer50000:	if( $@FlaviusBG1 == 2 )		mapannounce "bat_b01","Battle of Flavius Team Deathmatch will close in 10 seconds!",1,0x006400;	end;OnTimer60000:	if( $@FlaviusBG1 != 2 ) end;OnReset:	stopnpctimer;	set .Guillaume_Score, 99;	set .Croix_Score, 99;	set $@FlaviusBG1_Victory, 0;	// NPC's	disablenpc "Guillaume Vintenar#fl1";	disablenpc "Croix Vintenar#fl1";	disablenpc "Therapist in battle#fl11";	disablenpc "Therapist in battle#fl12";	if( $@FlaviusBG1_id1 ) { bg_destroy $@FlaviusBG1_id1; set $@FlaviusBG1_id1, 0; }	if( $@FlaviusBG1_id2 ) { bg_destroy $@FlaviusBG1_id2; set $@FlaviusBG1_id2, 0; }	sleep 1000;	mapwarp "bat_b01","bat_room",155,150;	sleep 2000;	bg_updatescore "bat_b01",.Guillaume_Score,.Croix_Score;	set $@FlaviusBG1, 0;	donpcevent "Flavius_BG1::OnReadyCheck";	end;}// View oponentes en el mapa <3-	script	viewtd	-,{end;OnPCLoadMapEvent:    if($@FlaviusBG1 != 1) {end;}    if(Bat_Team == 2) {    getmapxy .@MAPNAME$,.@X,.@Y,0,strcharinfo(0);    while(.@MAPNAME$ == "bat_b01"){    if($@FlaviusBG1 != 1) {end;}    getmapxy .@MAPNAME$,.@X,.@Y,0,strcharinfo(0);    if(.@MAPNAME$ != "bat_b01") { end;}    for(set .@i,0; .@i < getarraysize($@bg_red$); set .@i,.@i+1){    if($@bg_red$[.@i] == strcharinfo(0)) { set .@ontd,1; break;}    }    if(.@ontd != 1) {    setarray $@bg_red$[$@td_a],strcharinfo(0);    set $@td_a,$@td_a+1; }    set .@j,0;    for (set .@i,0; .@i < getarraysize($@bg_blue$); set .@i,.@i+1){        set .@j,.@j+1;        getmapxy(.mapES$, .xI, .yI,0,$@bg_blue$[.@i]);        viewpoint 1,.xI,.yI,.@j,0x0000ff;    } // cierre for    sleep2 1000;    } // cierre while    } else if(Bat_Team == 1) {    getmapxy .@MAPNAME$,.@X,.@Y,0,strcharinfo(0);    while(.@MAPNAME$ == "bat_b01"){    if($@FlaviusBG1 != 1) {end;}    getmapxy .@MAPNAME$,.@X,.@Y,0,strcharinfo(0);    if(.@MAPNAME$ != "bat_b01") { end;}    for(set .@i,0; .@i < getarraysize($@bg_blue$); set .@i,.@i+1){    if($@bg_blue$[.@i] == strcharinfo(0)) { set .@ontd,1; break;}    }    if(.@ontd != 1) {    setarray $@bg_blue$[$@td_b],strcharinfo(0);    set $@td_b,$@td_b+1; }    set .@j,0;    for (set .@i,0; .@i < getarraysize($@bg_red$); set .@i,.@i+1){        set .@j,.@j+1;        getmapxy(.mapES$, .xE, .yE,0,$@bg_red$[.@i]);        viewpoint 1,.xE,.yE,.@j,0xff0000;    } // cierre for    sleep2 1000;    } // cierre while    }    else { end; }    }// Battleground rewards// *********************************************************************bat_b01,390,13,5	script	Guillaume Vintenar#fl1	419,{	if( $@FlaviusBG1_Victory )	{		if( $@FlaviusBG1_Victory == Bat_Team )		{ // Victory			mes "[Swandery]";			mes "Blessed Guillaume!!";			mes "Let's enjoy our glorious victory!";			mes "" + strcharinfo(0) + ", its a sign reflecting victory";			close2;			set .@Reward,18;		}		else		{ // Derrota			mes "[Swandery]";			mes "You lost, but you're dedicated to this battle.";			mes "This is a reward for your great dedication by Guillaume Marollo!";			mes "Just take this defeat a lesson, and later you would definitely learn.";			close2;			set .@Reward,6;		}		set Flavius_BG_Tick, gettimetick(2) + 300;  //setquest 2070;		getitem 7829, .@Reward;		set .@ontd,0;		bg_leave;		warp "bat_room",155,150;		end;	}	end;}bat_b01,10,293,5	script	Croix Vintenar#fl1	415,{	if( $@FlaviusBG1_Victory )	{		if( $@FlaviusBG1_Victory == Bat_Team )		{ // Victory			mes "[Swandery]";			mes "Blessed Croax!!";			mes "Let's enjoy our glorious victory!";			mes "" + strcharinfo(0) + ", its a sign reflecting victory";			close2;			set .@Reward, 18;		}		else		{ // Derrota			mes "[Swandery]";			mes "Oh, " + strcharinfo(0) + ". Don't be sad.";			mes "Even though we didn't win, we did our best.";			mes "This is a Royal gift from Croix, and please don't forget this battle. We can win the next.";			close2;			set .@Reward, 6;		}		set Flavius_BG_Tick, gettimetick(2) + 300; //setquest 2070;		getitem 7829, .@Reward;		set .@ontd,0;		bg_leave;		warp "bat_room",155,150;		end;	}	end;}// Battleground Therapist// *********************************************************************bat_b01,390,13,5	script	Therapist in battle#fl12	95,{	OnHeal:	if((@h_last) && (getnpctimer(1))) end;		set @h_last,1;	percentheal 100,100;	repair 1101;	skilleffect 34,0; sc_start SC_BLESSING,240000,5;	skilleffect 29,0; sc_start SC_INC_AGI,240000,5;	dispbottom "HP/SP fully restored.";	if(!getnpctimer(1)){setnpctimer 0; attachnpctimer(strcharinfo(1)); startnpctimer;}	while(getbrokenid(1)){	repair(1);{		set .@i, .@i +1;    }	if (.@i) dispbottom .@i + " Item(s) Repaired.";}	end;	OnTimer5000:	set @h_last,0;	stopnpctimer;	end;		OnInit:	defpattern 1, "heal","OnHeal";	activatepset 1;	end;}bat_b01,10,293,5	script	Therapist in battle#fl11	95,{			OnHeal:	if((@h_last) && (getnpctimer(1))) end;		set @h_last,1;	percentheal 100,100;	repair 1101;	skilleffect 34,0; sc_start SC_BLESSING,240000,5;	skilleffect 29,0; sc_start SC_INC_AGI,240000,5;	dispbottom "HP/SP fully restored.";	if(!getnpctimer(1)){setnpctimer 0; attachnpctimer(strcharinfo(0)); startnpctimer;}	while(getbrokenid(1)){	repair(1);{		set .@i, .@i +1;    }	if (.@i) dispbottom .@i + " Item(s) Repaired.";}	end;	OnTimer5000:	set @h_last,0;	stopnpctimer;	end;		OnInit:	defpattern 1, "heal","OnHeal";	activatepset 1;	end;}// Battleground Respawn and Regroup// *********************************************************************bat_b01,390,10,0	script	#gfl1_respawn	139,{	end;OnBGStart:	initnpctimer;	end;OnBGStop:	stopnpctimer;	end;OnTimer9000:	misceffect 83;	end;OnTimer10000:	areapercentheal "bat_b01",382,2,397,17,100,100;	set .@mapx,rand(309,327);	set .@mapy,rand(141,159);	areawarp "bat_b01",382,2,397,17,"bat_b01",.@mapx,.@mapy;	initnpctimer;	end;}bat_b01,10,290,0	script	#cfl1_respawn	139,{	end;OnBGStart:	initnpctimer;	end;OnBGStop:	stopnpctimer;	end;OnTimer9000:	misceffect 83;	end;OnTimer10000:	areapercentheal "bat_b01",2,282,17,297,100,100;	set .@mapx,rand(72,91);	set .@mapy,rand(141,159);	areawarp "bat_b01",2,282,17,297,"bat_b01",.@mapx,.@mapy;	initnpctimer;	end;}// MapFlags// *********************************************************************bat_b01	mapflag	battleground	2bat_b01	mapflag	nomemobat_b01	mapflag	nosave	SavePointbat_b01	mapflag	noteleportbat_b01	mapflag	nowarpbat_b01	mapflag	nowarptobat_b01	mapflag	noreturnbat_b01	mapflag	nobranchbat_b01	mapflag	nopenaltybat_b01	mapflag	loadevent// ***********************************************************************

     

    Thank you in advance <3

     

    Kindly Move this Post, I accidentally posted it here, and it supposed to be on "Script Support Section" Thanks..


  7.  

    Index: conf/battle.conf===================================================================--- conf/battle.conf	(revision 12062)+++ conf/battle.conf	(working copy)@@ -58,4 +58,4 @@ import: conf/battle/misc.conf  //Your custom config goes here.-import: conf/import/battle_conf.txt+import: conf/battle/custom.confIndex: conf/battle/custom.conf===================================================================--- conf/battle/custom.conf	(revision 0)+++ conf/battle/custom.conf	(working copy)@@ -0,0 +1,7 @@+//--------------------------------------------------------------+// Hercules Battle Configuration File+//--------------------------------------------------------------++// Warp and Go delay in miliseconds ( 5000 = 5 Seconds )+// Official is 0+gowarp_delay: 5000 No newline at end of fileIndex: src/map/atcommand.c===================================================================--- src/map/atcommand.c	(revision 12062)+++ src/map/atcommand.c	(working copy)@@ -426,6 +431,10 @@ 		clif->message(fd, msg_txt(248)); 		return false; 	}+	if( !pc->get_group_level(sd) && DIFF_TICK(iTimer->gettick(),sd->canlog_tick) < battle_config.gowarp_delay ) {+		clif->message(fd,"@warp cannot be issued since you were into battle recently");+		return false;+	}	 	if (pc->setpos(sd, mapindex, x, y, CLR_TELEPORT) != 0) { 		clif->message(fd, msg_txt(1)); // Map not found. 		return false;@@ -1755,6 +1780,11 @@ 	memset(map_name, '0', sizeof(map_name)); 	memset(atcmd_output, '0', sizeof(atcmd_output)); 	+	if( !pc->get_group_level(sd) && DIFF_TICK(iTimer->gettick(),sd->canlog_tick) < battle_config.gowarp_delay ) {+		clif->message(fd,"@go cannot be issued since you were into battle recently");+		return -1;+	}+ 	// get the number 	town = atoi(message); 	Index: src/map/battle.c===================================================================--- src/map/battle.c	(revision 12062)+++ src/map/battle.c	(working copy)@@ -6486,6 +6527,7 @@ 	{ "gm_ignore_warpable_area",			&battle_config.gm_ignore_warpable_area,			0,		2,		100,			}, 	{ "packet_obfuscation",					&battle_config.packet_obfuscation,				1,		0,		3,				}, 	{ "client_accept_chatdori",             &battle_config.client_accept_chatdori,          0,      0,      INT_MAX,		},+	{ "gowarp_delay",                     	&battle_config.gowarp_delay,                  	0,      0,      INT_MAX,        }, }; #ifndef STATS_OPT_OUT /**Index: src/map/battle.h===================================================================--- src/map/battle.h	(revision 12062)+++ src/map/battle.h	(working copy)@@ -453,7 +453,7 @@ 	int gm_ignore_warpable_area; 	 	int client_accept_chatdori; // [Ai4rei/Mirei]-	+	int gowarp_delay; } battle_config;  Index: src/map/pc.c===================================================================--- src/map/pc.c	(revision 12062)+++ src/map/pc.c	(working copy)@@ -6630,6 +6648,8 @@ 		elemental_set_target(sd,src);  	sd->canlog_tick = iTimer->gettick();+	if( src->type == BL_PC )+		((TBL_PC*)src)->canlog_tick = iTimer->gettick();	 }  /*==========================================

    I manually patch this and it's now working 100%, thanks quesoph..


  8. @Greek Yeah!, like that one indeedy!..

    @quesoph. I'll try this one.. hope it'll work.. I'll give any feedback after the test..

    @neqste.. That would be awesome if it'll be on HPM but.. I'm having problems on making it work with the other Plugins..

    @jaBote.. I'll already tested the first method you posted but it won't work.. I dunu why..


  9. I would like to ask, if this is a Data modification or something and where could i possibly mess with it..

    Here's an Example of the Colored Equipment after the Enchantment through NPC..

     

    Untitled.jpg

     

    And also for the other Equips was Enchanted..

    Thank you in advance..

    Note: Kindly Move this topic to Client side Support, or to Graphic Section.. I mistakenly posted it.. </3...


  10. I can find the script isn't well tabbed, or I think there's a syntax problem It gives me lot of errors.. :)

     

    Edit: I did change the tabs and get working on from upto +7 :)

    but how do you check the refine success chance anyway?..


  11. Can someone customized this script.. just like

    HD Elu
    100% refine chance from +1 to +7 and down to 60, 40, 30 for going to +10..

    & for HD Ori

    100% refine chance same from +1 to +7 and down to 50, 40, 30 for going to +10..

     

    Here's the Original Script of Euphy..

    //===== rAthena Script ======================================= //= HD Refiners//===== By: ==================================================//= Euphy//===== Current Version: =====================================//= 1.0//===== Compatible With: =====================================//= rAthena SVN//===== Description: =========================================//= [Official Conversion]//= Refiners that use HD ores to refine equipment. Upon//= failure, the equipment is not destroyed; rather, its//= refine level decreases by 1. The success rate is identical//= to that for Enriched ores.//= - "Blacksmith Mighty Hammer" only refines from +7~9.//= - "Basta" only refines from +10 and up.//===== Additional Comments: =================================//= 1.0 First version. [Euphy]//============================================================// Blacksmith Mighty Hammer (+7~9)//============================================================-	script	::MightyHammer	-1,{	disable_items;	mes "[Blacksmith Mighty Hammer]";	mes "Unlike others, I am a blacksmith who refines a very limited number of items.";	mes "I refine only items that are ^CC0000+7 to +9^000000.";	next;	mes "[Blacksmith Mighty Hammer]";	mes "My specialty is that even if my refining fails, the refine level decreases by 1 without losing the gear. Isn't it great?";	next;	mes "[Blacksmith Mighty Hammer]";	mes "So lets kick this into overdrive, what d' ya say? What item do you want to refine?";	next;	setarray .@position$[1],"Head","Body","Left Hand","Right Hand","Robe","Shoes","Accessory 1","Accessory 2","Head 2","Head 3";	set .@menu$,"";	for(set .@i,1; .@i<=10; set .@i,.@i+1)		set .@menu$, .@menu$+((getequipisequiped(.@i))?getequipname(.@i):.@position$[.@i]+"-[Not equipped]")+":";	set .@part, select(.@menu$);	if (!getequipisequiped(.@part)) {		mes "[Blacksmith Mighty Hammer]";		switch(.@part) {		case 1:			mes "I'm a blacksmith, not a hairstylist.";			break;		case 2:			mes "With my hammer, I will make you a star of the sky.";			break;		case 3:		case 4:			mes "Making artificial hands is not my specialty.";			break;		case 5:			mes "Bring out the item so I can refine it!";			break;		case 6:			mes "Where is this foot odor coming from?";			break;		case 7:		case 8:			mes "Where is the accessory?";			break;		case 9:			mes "What do you want me to refine?";			break;		case 10:			mes "Huh? What do you want me to do?";			break;		}		close;	}	if (!getequipisenableref(.@part)) {		mes "[Blacksmith Mighty Hammer]";		mes "This item can't be refined.";		close;	}	if (getequiprefinerycnt(.@part) < 7 || getequiprefinerycnt(.@part) > 9) {		mes "[Blacksmith Mighty Hammer]";		mes "I only handle items with refine levels from +7 to +9.";		close;	}	switch(getequipweaponlv(.@part)) {	default:	case 0:		set .@price,20000;		set .@material,6241; //HD_Elunium		break;	case 1:	case 2:	case 3:	case 4:		set .@price,20000;		set .@material,6240; //HD_Oridecon		break;	}	mes "[Blacksmith Mighty Hammer]";	mes "In order to refine the gear you selected you need ^ff9999"+getitemname(.@material)+"^000000 and 20,000 zeny as a fee.";	mes "Do you have them ready?";	next;	if(select("Yes:No") == 2) {		mes "[Blacksmith Mighty Hammer]";		mes "I will wait until you are ready.";		close;	}	if (getequippercentrefinery(.@part) < 100) {		mes "[Blacksmith Mighty Hammer]";		mes "It looks like this item will likely fail to be refined.";		mes "Well, even if it fails, it only decreases by 1 refine level.";		mes "Would you like to continue refining?";		next;		if(select("Yes:No") == 2) {			mes "[Blacksmith Mighty Hammer]";			mes "Only those who overcome fear of failure will obtain a masterpiece.";			close;		}	}	if (countitem(.@material) == 0 || Zeny < .@price) {		mes "[Blacksmith Mighty Hammer]";		mes "Didn't you just say you had everything ready?";		close;	}	delitem .@material,1;	set Zeny, Zeny-.@price;	mes "[Blacksmith Mighty Hammer]";	mes "Tac! Tac! Tac!";	if (getequippercentrefinery(.@part) > rand(100) || getequippercentrefinery(.@part) > rand(100)) {		successrefitem .@part;		next;		emotion e_no1;		mes "[Blacksmith Mighty Hammer]";		mes "The sound refreshes my mind everytime I hear it.";		mes "Here, have it. Refine succeeded flawlessly!";		close;	}	downrefitem .@part;	next;	emotion e_omg;	mes "[Blacksmith Mighty Hammer]";	mes "Oops!!";	next;	mes "[Blacksmith Mighty Hammer]";	mes "I am sure a person like you would never blame me for a decrease in refine level by 1. Hmm.";	close;}prt_in,59,54,3	duplicate(MightyHammer)	Mighty Hammer#prt	826morocc_in,65,30,3	duplicate(MightyHammer)	Mighty Hammer#morocc	826payon,148,176,3	duplicate(MightyHammer)	Mighty Hammer#pay	826alberta_in,16,56,3	duplicate(MightyHammer)	Mighty Hammer#alb	826yuno_in01,171,18,3	duplicate(MightyHammer)	Mighty Hammer#yuno	826ein_in01,22,82,3	duplicate(MightyHammer)	Mighty Hammer#ein	826lhz_in02,280,19,3	duplicate(MightyHammer)	Mighty Hammer#lhz	826// iRO NPC locations:// moc_para01,38,185,4	duplicate(MightyHammer)	Mighty Hammer#ed	826// payon,174,133,4	duplicate(MightyHammer)	Mighty Hammer#im	826 

     

    I really appreciate your help!, Thanks in Advance..


  12. I haven't any problems at the Emulator, But the Npc says I have an Error with an Invalid Menu Selection..
    well here's the script..

    // Settings ://	-	Only required to edit the ShopSetting() Function//			Notes : You may also add / remove Menu ( If any ) //	-	Shop Currency can be either ItemID or Variable Name, but must write within Quotation Marks ( "" )//			Ex. of Variable.	->	Zeny , #CASHPOINTS , #KAFRAPOINTS , CustomVariable , #CustomVariable//	-	ERROR Message are used to show Invalid Settings in your NPC.// Leave this alone...-	shop	Emistry_Shop	-1,512:100pvp_y_3-3,171,314,4	script	Weapons	513,{function ShopSettings;function ValidateCost;function CurrencyInfo;function ClearData;function ValueConvert;function ErrorNotice;mes "Hello and Good Day to you!, I have the finest Weapons";mes "In town Take a Look and I'm sure you'll gotta love it";next;// Menu Selectionselect("1 & 2 Handed Swords","Axe & Daggers","Mace & Knux");ClearData();ShopSettings( @menu );npcshopitem "Emistry_Shop",512,100;npcshopdelitem "Emistry_Shop",512;for(set .@i,0; .@i < getarraysize( @ItemLists ); set .@i,.@i+1)	npcshopadditem "Emistry_Shop",@ItemLists[.@i],@ItemCost[.@i];mes "Okay.. These are all I have in Stock";callshop "Emistry_Shop",1;npcshopattach "Emistry_Shop";end;function	ShopSettings	{	switch( getarg(0) ){		Case 1:			// Currency [ Item ID / Variable Name ]			set @Currency$,"zeny";			// Item ID Lists			setarray @ItemLists[0],1108,1117,1124,1130,1120,1149,1155,1158,1163,1164,1165;			// Item Price			setarray @ItemCost[0],2500,3000,10000,12000,50000,70000,22500,60000,74000,90000,12000;			break;		Case 2:			// Currency [ Item ID / Variable Name ]			set @Currency$,"zeny";			// Item ID Lists			setarray @ItemLists[0],1302;			// Item Price			setarray @ItemCost[0],10000;			break;		Case 3:			// Currency [ Item ID / Variable Name ]			set @Currency$,"zeny";			// Item ID Lists			setarray @ItemLists[0],2306,2302,2303,2304,2305,2301;			// Item Price			setarray @ItemCost[0],20,22,34,445,52,641;			break;		// Case 4,5,6.....etc...		default:			ErrorNotice( "Invalid Menu Selection for Menu "+@menu+"." );			close;	}		if( @Currency$ == "" )	ErrorNotice( "Invalid Currency Setting in Menu "+@menu+" ." );if( getarraysize( @ItemCost ) != getarraysize( @ItemLists ) || getarraysize( @ItemLists ) != getarraysize( @ItemCost ) )	ErrorNotice( "Missing or Extra Value of Item or Cost Settings in Menu "+@menu+" ." );return;}function	ErrorNotice	{	mes "^FF0000ERROR^000000 - "+getarg(0);	mes "^00FF00____________________________^000000";	mes "Inform this Message to ^0000FFGame Staffs^000000 immediately !";	close;}function	CurrencyInfo	{	if( getitemname( atoi( getarg(0) ) ) != "null" ){		mes "Item Currency : ^FF0000"+getitemname( atoi( getarg(0) ) )+"^000000";		mes "Available Amount : ^0000FF"+ValueConvert( countitem( atoi( getarg(0) ) ) )+"^000000";	}else if( getitemname( atoi( getarg(0) ) ) == "null" ){		mes "Variable Currency : ^FF0000"+getarg(0)+"^000000";		mes "Available Amount : ^0000FF"+ValueConvert( getd( getarg(0) ) )+"^000000";	}return;}function	ValidateCost	{	if( getitemname( atoi( getarg(0) ) ) != "null" ){		if( countitem( atoi( getarg(0) ) ) < getarg(1) ) return 1;	}else{		if( getd( getarg(0) ) < getarg(1) ) return 1;	}return 0;}function ClearData	{	set @Currency$,"";	set @TotalCost,0;	deletearray @bought_nameid[0],getarraysize( @bought_nameid );	deletearray @bought_quantity[0],getarraysize( @bought_quantity );	deletearray @ItemLists[0],getarraysize( @ItemLists );	deletearray @ItemCost[0],getarraysize( @ItemCost );return;}function	ValueConvert	{	set .@num, atoi(""+getarg(0));	if ( .@num == 0 || .@num >= 2147483647 ) return getarg(0);	set .@l, getstrlen(""+.@num);	for ( set .@i,0; .@i < .@l; set .@i, .@i + 1 ) {		set .@num$, .@num % pow(10,.@i+1) / pow(10,.@i) + .@num$;			if ( (.@i+1) % 3 == 0 && .@i+1 != .@l ) set .@num$, ","+ .@num$;	}	return .@num$;}OnBuyItem:	ShopSettings( @menu );	for(set @i,0; @i < getarraysize( @bought_nameid ); set @i,@i+1)		for(set @j,0; @j < getarraysize( @ItemLists ); set @j,@j+1)			if( @ItemLists[@j] == @bought_nameid[@i] )			set @TotalCost,@TotalCost + ( @ItemCost[@j] * @bought_quantity[@i] );		mes "[ Jimboy ]";	mes "^FF0000       BILLING LIST^000000";	mes "^00FF00____________________________^000000";	for( set @i,0; @i < getarraysize( @bought_nameid ); set @i,@i+1 )			mes "^FF0000"+@bought_quantity[@i]+" x ^0000FF"+getitemname( @bought_nameid[@i] )+"^000000";	mes "^00FF00____________________________^000000";	if( getitemname( atoi( @Currency$ ) ) != "null" )		mes "Total Cost : ^0000FF"+ValueConvert( @TotalCost )+" x "+getitemname( atoi( @Currency$ ) )+"^000000";	else if( getitemname( atoi( @Currency$ ) ) == "null" ){		mes "Total Cost : ^0000FF"+ValueConvert( @TotalCost )+" "+@Currency$+"^000000";	}		mes "^00FF00____________________________^000000";	if( ValidateCost( @Currency$,@TotalCost ) ){		if( getitemname( atoi( @Currency$ ) ) != "null" )			mes "[ ^FF0000X^000000 ] Insufficient ^0000FF"+getitemname( atoi( @Currency$ ) )+"^000000";		else{			mes "[ ^FF0000X^000000 ] Insufficient ^0000FF"+@Currency$+"^000000";		}	}else{		if( select( "^0000FFPurchase^000000:Cancel" ) == 1 ){			if( getitemname( atoi( @Currency$ ) ) != "null" )				delitem atoi( @Currency$ ),@TotalCost;			else{				set getd( @Currency$ ),getd( @Currency$ ) - @TotalCost;			}			for(set @i,0; @i < getarraysize( @bought_nameid ); set @i,@i+1)				getitem @bought_nameid[@i],@bought_quantity[@i];			message strcharinfo(0),"Purchased "+getarraysize( @bought_nameid )+" Items.";			mes "Thank you for shopping.";		}	}ClearData();close;}
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.