Jump to content

ThyroDree

Members
  • Content Count

    556
  • Joined

  • Last visited

Posts posted by ThyroDree


  1. On 4/12/2020 at 1:19 AM, Patskie said:

    Can you try below script? :P

    prontera,150,150,0 script Thanatos Summoner#22 4W_SAILOR,{ mes .npc$; .@party_id = getcharid(1); .@i = strnpcinfo(2); if (getd(".qwerty" + .@i)) { mes "Someone is talking to me!"; emotion 23; close; } setd(".qwerty" + .@i, 1); if (.@party_id && getpartyleader(.@party_id, 2) != getcharid(0)) { mes "Only the party leader can talk to me"; } else { mes "Hi " + strcharinfo(0) + ", What can i do for you?"; next; if (select("I want to summon Thanatos:Cancel") == 1 ) { mes .npc$; mes "You need the following items to summon thanatos"; .@a = 0; while (.@a < .size) { mes "> " + .fragments[.@a+1] + "x " + getitemname(.fragments[.@a]); .@a += 2; } next; if (select("Yes, I have those items and I'm ready to fight:I will think twice") == 1) { .@a = 0; while (.@a < .size) { if (countitem(.fragments[.@a]) < .fragments[.@a+1]) { mes .npc$; mes "You lack " + getitemname(.fragments[.@a]); setd(".qwerty" + .@i, 0); close; } .@a += 2; } .@a = 0; while (.@a < .size) { delitem .fragments[.@a], .fragments[.@a+1]; .@a += 2; } if (getcharid(1)) { announce "Party " + getpartyname(.@party_id) + " has initiated Thanatos Summoner", 0; warpparty "thana_boss", 113, 165, .@party_id, true; } else { announce strcharinfo(0) + " has initiated Thanatos Summoner", 0; warp "thana_boss", 113, 165; } monster "thana_boss", 0, 0, "--ja--", 1708, 1, strnpcinfo(3) + "::OnKill"; hideonnpc strnpcinfo(3); } } } setd(".qwerty" + .@i, 0); close; // 50 minutes mark On50MinMark: announce "Thanatos Summoner will open in 10 minutes", 0; addtimer 300000, strnpcinfo(3) + "::On55MinMark"; end; // 55 minutes mark On55MinMark: announce "Thanatos Summoner will open in 5 minutes", 0; addtimer 240000, strnpcinfo(3) + "::On59MinMark"; end; // 59 minutes mark On59MinMark: announce "Thanatos Summoner will open in 1 minute", 0; addtimer 60000, strnpcinfo(3) + "::OnEnable"; end; // 60 minutes mark OnEnable: announce "Thanatos Summoner is open", 0; hideoffnpc strnpcinfo(3); end; OnKill: .@party_id = getcharid(1); if (!.@party_id) { announce strcharinfo(0) + " successfully killed Thanatos", 0; sleep2 .warp_interval * 60 * 1000; warp "prontera", 150, 150; } else { announce strcharinfo(0) + " of party " + getpartyname(.@party_id) + " successfully killed Thanatos", 0; sleep2 .warp_interval * 60 * 1000; warpparty "prontera", 150, 150, .@party_id, true; } announce "Thanatos summoner will open again after " + .npc_interval + " minutes", 0; addtimer .npc_interval * 60 * 1000, strnpcinfo(3) + "::On50MinMark"; end; OnPCDieEvent: if (strcharinfo(3) == "thana_boss") warp "SavePoint", 0, 0; if (!getmapusers("thana_boss")) { announce "No one manage to kill Thanatos. Thanatos summoner will open again after " + .npc_interval + " minutes", 0; killmonsterall "thana_boss"; addtimer .npc_interval * 60 * 1000, strnpcinfo(3) + "::On50MinMark"; } end; OnInit: .npc$ = "[" + strnpcinfo(1) + "]"; setarray .fragments[0], 1000, 2, 1001, 4; // <item_id>, <amount> .size = getarraysize(.fragments); .npc_interval = 50; // 50 minutes .warp_interval = 3; // 3 minutes announce "Thanatos Summoner is open", 0; end; } thana_boss mapflag nowarp thana_boss mapflag noreturn thana_boss mapflag nowarpto

    
    prontera,150,150,0	script	Thanatos Summoner#22	4W_SAILOR,{
    	mes .npc$;
    
    	.@party_id = getcharid(1);
    	
    	.@i	= strnpcinfo(2);
    	
    	if (getd(".qwerty" + .@i)) {
    		mes "Someone is talking to me!";
    		emotion 23;
    		close;
    	}
    	
    	setd(".qwerty" + .@i, 1);
    	
    	if (.@party_id && getpartyleader(.@party_id, 2) != getcharid(0)) {
    		mes "Only the party leader can talk to me";
    	} else {
    		mes "Hi " + strcharinfo(0) + ", What can i do for you?";
    		next;
    		if (select("I want to summon Thanatos:Cancel") == 1 ) {
    			mes .npc$;
    			mes "You need the following items to summon thanatos";
    			.@a = 0;
    			while (.@a < .size) {
    				mes "> " + .fragments[.@a+1] + "x " + getitemname(.fragments[.@a]);
    				.@a += 2;
    			}
    			next;
    			if (select("Yes, I have those items and I'm ready to fight:I will think twice") == 1) {
    				.@a = 0;
    				while (.@a < .size) {
    					if (countitem(.fragments[.@a]) < .fragments[.@a+1]) {
    						mes .npc$;
    						mes "You lack " + getitemname(.fragments[.@a]);
    						setd(".qwerty" + .@i, 0);
    						close;
    					}
    					.@a += 2;
    				}
    				.@a = 0;
    				while (.@a < .size) {
    					delitem .fragments[.@a], .fragments[.@a+1];
    					.@a += 2;
    				}
    				if (getcharid(1)) {
    					announce "Party " + getpartyname(.@party_id) + " has initiated Thanatos Summoner", 0;
    					warpparty "thana_boss", 113, 165, .@party_id, true;
    				} else {
    					announce strcharinfo(0) + " has initiated Thanatos Summoner", 0;
    					warp "thana_boss", 113, 165;
    				}
    				monster "thana_boss", 0, 0, "--ja--", 1708, 1, strnpcinfo(3) + "::OnKill";
    				hideonnpc strnpcinfo(3);
    			}
    		}
    	}
    	
    	setd(".qwerty" + .@i, 0);
    	close;
    
    	// 50 minutes mark
    	On50MinMark:
    		announce "Thanatos Summoner will open in 10 minutes", 0;
    		addtimer 300000, strnpcinfo(3) + "::On55MinMark";
    		end;
    	// 55 minutes mark
    	On55MinMark:
    		announce "Thanatos Summoner will open in 5 minutes", 0;
    		addtimer 240000, strnpcinfo(3) + "::On59MinMark";
    		end;
    	// 59 minutes mark
    	On59MinMark:
    		announce "Thanatos Summoner will open in 1 minute", 0;
    		addtimer 60000, strnpcinfo(3) + "::OnEnable";
    		end;
    	// 60 minutes mark
    	OnEnable:
    		announce "Thanatos Summoner is open", 0;
    		hideoffnpc strnpcinfo(3);
    		end;
    		
    	OnKill:
    		.@party_id = getcharid(1);
    		if (!.@party_id) {
    			announce strcharinfo(0) + " successfully killed Thanatos", 0;
    			sleep2 .warp_interval * 60 * 1000;
    			warp "prontera", 150, 150;
    		} else {
    			announce strcharinfo(0) + " of party " + getpartyname(.@party_id) + " successfully killed Thanatos", 0;
    			sleep2 .warp_interval * 60 * 1000;
    			warpparty "prontera", 150, 150, .@party_id, true;
    		}
    		announce "Thanatos summoner will open again after " + .npc_interval + " minutes", 0;
    		addtimer .npc_interval * 60 * 1000, strnpcinfo(3) + "::On50MinMark";
    		end;
    		
    	OnPCDieEvent:
    		if (strcharinfo(3) == "thana_boss")
    			warp "SavePoint", 0, 0;
    		if (!getmapusers("thana_boss")) {
    			announce "No one manage to kill Thanatos. Thanatos summoner will open again after " + .npc_interval + " minutes", 0;
    			killmonsterall "thana_boss";
    			addtimer .npc_interval * 60 * 1000, strnpcinfo(3) + "::On50MinMark";
    		}
    		end;
    	
    	OnInit:
    		.npc$ = "[" + strnpcinfo(1) + "]";
    		setarray .fragments[0], 1000, 2, 1001, 4; // <item_id>, <amount>
    		.size = getarraysize(.fragments);
    		.npc_interval = 50; // 50 minutes
    		.warp_interval = 3; // 3 minutes
    		announce "Thanatos Summoner is open", 0;
    		end;
    		
    }
    
    thana_boss	mapflag	nowarp
    thana_boss	mapflag	noreturn
    thana_boss	mapflag	nowarpto

     

    Hi, do I need to disable the official summon quest script before using this script? I think using this with official thanatos quest is not connected, 


  2. Hello, I have used the @pk source patch since Dastgir pk plugin isn't working on me.. Can anyone help me make modify the command line when using @pk? 

    I wanted to make it @pk <on/off> features not only @pk only itself no Toggle ON / OFF..

     

     

    I will attach the file patch.

    pk.patch


  3. How can I enable the preview item of quest item? It's not showing the Preview Case

    //===== rAthena Script =======================================
    //= Euphy's Quest Shop
    //===== By: ==================================================
    //= Euphy
    //===== Current Version: =====================================
    //= 1.6b
    //===== Compatible With: =====================================
    //= rAthena SVN r16862+
    //===== Description: =========================================
    //= A dynamic quest shop based on Lunar's, with easier config.
    //= Includes support for multiple shops & cashpoints.
    //= Item Preview script by ToastOfDoom.
    //===== Additional Comments: =================================
    //= 1.0 Initial script.
    //= 1.2 Added category support.
    //= 1.3 More options and fixes.
    //= 1.4 Added debug settings.
    //= 1.5 Replaced categories with shop IDs.
    //= 1.6 Added support for purchasing stackables.
    //= 1.6a Added support for previewing costumes and robes.
    //= 1.6b Added 'disable_items' command.
    //============================================================
    
    // Shop NPCs -- supplying no argument displays entire menu.
    //	callfunc "qshop"{,<shop ID>{,<shop ID>{,...}}};
    //============================================================
    mall,100,120,4	script	Headgear Quest Shop#4	4_MAL_SOLDIER,{ 
    	callfunc "oshop1";
    OnInit:
    //	waitingroom "Quest",0;
    	end;
     }
    
    // Script Core
    //============================================================
    -	script	offquest_shop	FAKE_NPC,{ 
    function Add; function Chk; function Slot; function A_An;
    OnInit:
    	freeloop(1);
    	
    
    // -----------------------------------------------------------
    //  Basic shop settings.
    // -----------------------------------------------------------
    
    	set .announce,0;	// Announce quest completion? (1: yes / 0: no)
    	set .ShowSlot,1;	// Show item slots? (2: all equipment / 1: if slots > 0 / 0: never)
    	set .ShowID,1;  	// Show item IDs? (1: yes / 0: no)
    	set .ShowZeny,0;	// Show Zeny cost, if any? (1: yes / 0: no)
    	set .MaxStack,100;	// Max number of quest items purchased at one time.
    
    // -----------------------------------------------------------
    //  Points variable -- optional quest requirement.
    //	setarray .Points$[0],"<variable name>","<display name>";
    // -----------------------------------------------------------
    
    	setarray .Points$[0],"#CASHPOINTS","Cash Points";
    
    // -----------------------------------------------------------
    //  Shop IDs -- to add shops, copy dummy data at bottom of file.
    //	setarray .Shops$[1],"<Shop 1>","<Shop 2>"{,...};
    // -----------------------------------------------------------
    
    	setarray .Shops$[1],"Upper Gear","Middle Gear";
    
    // -----------------------------------------------------------
    //  Quest items -- do NOT use a reward item more than once!
    //	Add(<shop ID>,<reward ID>,<reward amount>,
    //	    <Zeny cost>,<point cost>,
    //	    <required item ID>,<required item amount>{,...});
    // -----------------------------------------------------------
    //---------- Upper
    	Add(1,2284,1,0,0,923,20);
    	Add(1,5076,1,0,0,2227,1,7038,500);
    	Add(1,5199,1,0,0,2227,1,978,1,1057,100);
    	Add(1,5057,1,10000,0,2213,1,983,1,914,200);
    	Add(1,5065,1,0,0,624,1,959,500,1023,1);
    	Add(1,5016,1,0,0,1030,10,0,0,0,0,0,0);
    	Add(1,2214,1,0,0,949,100,706,1,722,1,2213,1);
    	Add(1,5026,1,0,0,1036,450,949,330,539,120,982,1);
    	Add(1,5108,1,5000,0,7301,500,611,10);
    	Add(1,5038,1,0,0,1038,600,7048,40);
    	Add(1,5258,1,0,0,914,100,975,1,976,1,978,1);
    	Add(1,5058,1,0,0,2233,1,983,1,7206,300,7030,1);
    	Add(1,5205,1,0,0,610,100,706,25,7194,300);
    //	Add(1,5427,1,0,0,5288,1,12078,1,7521,1,12183,1);
    //	Add(1,5188,1,0,0,5027,1,7166,50,7064,1);
    //	Add(1,5426,1,0,0,5027,1,976,5);
    	Add(1,5001,1,0,0,999,40,984,1,970,1,1003,1);
    	Add(1,5070,1,0,0,7216,300,7097,300,2211,1,982,1);
    	Add(1,5069,1,0,0,1022,99);
    	Add(1,5027,1,0,0,2252,1,1036,400,7001,50,4052,1);
    	Add(1,2280,1,10000,0,1019,120);
    	Add(1,5062,1,0,0,2280,1,7197,300,7150,300);
    	Add(1,5121,1,0,0,7263,1,660,1,7099,30,7315,369);
    
    
    //---------- Middle
    	Add(2,5074,1,20000,0,2286,1,2254,1);
    	Add(2,5068,1,20000,0,2255,1,2286,1);
    	Add(2,2296,1,50000,0,999,100);
    	Add(2,5040,1,0,0,7047,100);
    	Add(2,5175,1,100000,0,7111,100,938,99,983,1);
    	Add(2,2281,1,5000,0,998,20,707,1);
    	Add(2,5043,1,0,0,2281,1,1048,50);
    	Add(2,2202,1,0,0,7020,2,999,100);
    
    // -----------------------------------------------------------
    
    	freeloop(0);
    	set .menu$,"";
    	for(set .@i,1; .@i<=getarraysize(.Shops$); set .@i,.@i+1) {
    		set .menu$, .menu$+.Shops$[.@i]+":";
    		npcshopdelitem "oshop"+.@i,909;
    	}
    	end;
    
    OnMenu:
    	set .@size, getarraysize(@i);
    	if (!.@size) set .@i, select(.menu$);
    	else if (.@size == 1) set .@i, @i[0];
    	else {
    		for(set .@j,0; .@j<.@size; set .@j,.@j+1)
    			set .@menu$, .@menu$+.Shops$[@i[.@j]]+":";
    		set .@i, @i[select(.@menu$)-1];
    	}
    	deletearray @i[0],getarraysize(@i);
    	if (.Shops$[.@i] == "") {
    		message strcharinfo(0),"An error has occurred.";
    		end;
    	}
    	dispbottom "Select one item at a time.";
    	callshop "oshop"+.@i,1;
    	npcshopattach "oshop"+.@i;
    	end;
    
    OnBuyItem:
    	// .@q[] : RewardID, BoughtAmt, RewardAmt, BaseAmt, ReqZeny, ReqPts, { ReqItem, ReqAmt, ... }
    	setarray .@q[0],@bought_nameid[0],((@bought_quantity[0] > .MaxStack)?.MaxStack:@bought_quantity[0]);
    	copyarray .@q[3],getd(".q_"+.@q[0]+"[0]"),getarraysize(getd(".q_"+.@q[0]));
    	set .@q[2],.@q[1]*.@q[3];
    	if (!.@q[2] || .@q[2] > 30000) {
    		message strcharinfo(0),"You can't purchase that many "+getitemname(.@q[0])+".";
    		end;
    	}
    	mes "[Quest Shop]";
    	mes "Reward: ^0055FF"+((.@q[2] > 1)?.@q[2]+"x ":"")+Slot(.@q[0])+"^000000";
    	mes "Requirements:";
    	disable_items;
    	if (.@q[4]) mes " > "+Chk(Zeny,.@q[4]*.@q[1])+(.@q[4]*.@q[1])+" Zeny^000000";
    	if (.@q[5]) mes " > "+Chk(getd(.Points$[0]),.@q[5]*.@q[1])+(.@q[5]*.@q[1])+" "+.Points$[1]+" ("+getd(.Points$[0])+"/"+(.@q[5]*.@q[1])+")^000000";
    	if (.@q[6]) for(set .@i,6; .@i<getarraysize(.@q); set .@i,.@i+2)
    		mes " > "+Chk(countitem(.@q[.@i]),.@q[.@i+1]*.@q[1])+((.ShowID)?"{"+.@q[.@i]+"} ":"")+Slot(.@q[.@i])+" ("+countitem(.@q[.@i])+"/"+(.@q[.@i+1]*.@q[1])+")^000000";
    	next;
    	setarray @qe[1], getiteminfo(.@q[0],5), getiteminfo(.@q[0],11);
    	if (@qe[2] > 0 && ((@qe[1] & 1) || (@qe[1] & 256) || (@qe[1] & 512) || (@qe[1] & 1024) || (@qe[1] & 2048) || (@qe[1] & 4096) || (@qe[1] & 4) || (@qe[1] & 8192)))
    		set .@preview,1;
    	addtimer 1000, strnpcinfo(0)+"::OnEnd";
    	while(1) {
    		switch(select(" ~ Purchase ^0055FF"+getitemname(.@q[0])+"^000000:"+((.@preview && !@qe[7])?" ~ Preview...":"")+": ~ ^777777Cancel^000000")) {
    		case 1:
    			if (@qe[0]) { 
    				mes "[Quest Shop]";
    				mes "You're missing one or more quest requirements.";
    				close;
    			}
    			if (!checkweight(.@q[0],.@q[2])) {
    				mes "[Quest Shop]";
    				mes "^FF0000You need "+(((.@q[2]*getiteminfo(.@q[0],6))+Weight-MaxWeight)/10)+" additional weight capacity to complete this trade.^000000";
    				close;
    			}
    			if (.@q[4]) set Zeny, Zeny-(.@q[4]*.@q[1]);
    			if (.@q[5]) setd .Points$[0], getd(.Points$[0])-(.@q[5]*.@q[1]);
    			if (.@q[6]) for(set .@i,6; .@i<getarraysize(.@q); set .@i,.@i+2)
    				delitem .@q[.@i],.@q[.@i+1]*.@q[1];
    			getitem .@q[0],.@q[2];
    			if (.announce) announce strcharinfo(0)+" has created "+((.@q[2] > 1)?.@q[2]+"x "+getitemname(.@q[0]):A_An(getitemname(.@q[0])))+"!",0,0xFF6060; // f87e7b;
    			specialeffect EF_FLOWERLEAF;
    			close;
    		case 2:
    			setarray @qe[3], getlook(LOOK_HEAD_BOTTOM), getlook(LOOK_HEAD_TOP), getlook(LOOK_HEAD_MID), getlook(LOOK_ROBE), 1;
    			if ((@qe[1] & 1) || (@qe[1] & 4096)) changelook LOOK_HEAD_BOTTOM, @qe[2];
    			else if ((@qe[1] & 256) || (@qe[1] & 1024)) changelook LOOK_HEAD_TOP, @qe[2];
    			else if ((@qe[1] & 512) || (@qe[1] & 2048)) changelook LOOK_HEAD_MID, @qe[2];
    			else if ((@qe[1] & 4) || (@qe[1] & 8192)) changelook LOOK_ROBE, @qe[2];
    			break;
    		case 3:
    			close;
    		}
    	}
    
    OnEnd:
    	if (@qe[7]) {
    		changelook LOOK_HEAD_BOTTOM, @qe[3];
    		changelook LOOK_HEAD_TOP, @qe[4];
    		changelook LOOK_HEAD_MID, @qe[5];
    		changelook LOOK_ROBE, @qe[6];
    	}
    	deletearray @qe[0],8;
    	end;
    	
    function Add {
    	if (getitemname(getarg(1)) == "null") {
    		consolemes(CONSOLEMES_DEBUG, "Quest reward #"+getarg(1)+" invalid (skipped).");
    		return;
    	}
    	setarray .@j[0],getarg(2),getarg(3),getarg(4);
    	for(set .@i,5; .@i<getargcount(); set .@i,.@i+2) {
    		if (getitemname(getarg(.@i)) == "null") {
    			consolemes(CONSOLEMES_DEBUG, "Quest requirement #"+getarg(.@i)+" invalid (skipped).");
    			return;
    		} else
    			setarray .@j[.@i-2],getarg(.@i),getarg(.@i+1);
    	}
    	copyarray getd(".q_"+getarg(1)+"[0]"),.@j[0],getarraysize(.@j);
    	npcshopadditem "oshop"+getarg(0),getarg(1),((.ShowZeny)?getarg(3):0);
    	return;
    }
    
    function Chk {
    	if (getarg(0) < getarg(1)) {
    		set @qe[0],1;
    		return "^FF0000";
    	} else
    		return "^00FF00";
    }
    
    function Slot {
    	set .@s$,getitemname(getarg(0));
    	switch(.ShowSlot) {
    		case 1: if (!getitemslots(getarg(0))) return .@s$;
    		case 2: if (getiteminfo(getarg(0),2) == 4 || getiteminfo(getarg(0),2) == 5) return .@s$+" ["+getitemslots(getarg(0))+"]";
    		default: return .@s$;
    	}
    }
    
    function A_An {
    	setarray .@A$[0],"a","e","i","o","u";
    	set .@B$, "_"+getarg(0);
    	for(set .@i,0; .@i<5; set .@i,.@i+1)
    		if (compare(.@B$,"_"+.@A$[.@i])) return "an "+getarg(0);
    	return "a "+getarg(0);
    }
    }
    
    function	script	oshop1	{
    	deletearray @i[0],getarraysize(@i);
    	for(set .@i,0; .@i<getargcount(); set .@i,.@i+1)
    		set @i[.@i],getarg(.@i);
    	doevent "offquest_shop::OnMenu";
    	end;
    	
    }
    
    
    // Dummy shop data -- copy as needed.
    //============================================================
    -	shop	oshop1	FAKE_NPC,909:-1
    -	shop	oshop2	FAKE_NPC,909:-1

     


  4. Anyone can help me fix this warning showing on my atcommand.c when compiling?

    
    atcommand.c: In function atcommand_pk’:
    ../common/nullpo.h:69:23: warning: nonnull argument sd compared to NULL [-Wnonnull-compare]
     #define nullpo_chk(t) ( (t) != NULL ? false : (nullpo->assert_report(__FILE__, __LINE__, __func__, #t, "nullpo info"), true) )
                           ^
    ../common/nullpo.h:124:11: note: in expansion of macro nullpo_chk
      do { if (nullpo_chk(t)) return(ret); } while(0)
               ^~~~~~~~~~
    atcommand.c:9732:2: note: in expansion of macro nullpo_retr
      nullpo_retr(-1, sd);
      ^~~~~~~~~~~

    This warning shows after I added a source mod of PK which is this lines..

    
    +ACMD(pk) {
    +
    +	int64 tick = timer->gettick();
    +
    +	nullpo_retr(-1, sd);
    +
    +	if( map->list[sd->bl.m].flag.pvp || map->list[sd->bl.m].flag.gvg || map->list[sd->bl.m].flag.gvg_castle || map->list[sd->bl.m].flag.gvg_castle || map->list[sd->bl.m].flag.battleground ) {
    +		clif->message(sd->fd, "You can only change your PK state on non-PVP maps.");
    +		return false;
    +	}
    +
    +	if(DIFF_TICK(sd->pk_mode_tick,tick) > 0){ //check the delay before use this command again
    +		clif->message(sd->fd, "You can turn OFF your PK state after 3 minutes.");
    +		return false;
    +	}
    +	else {
    +		if (!sd->state.pk_mode) {
    +			sd->state.pk_mode = 1;
    +			clif->message(sd->fd, "Your PK state is now OFF");
    +			sd->pk_mode_tick = tick + 0; //set the delay here
    +		} else {
    +			sd->state.pk_mode = 0;
    +			clif->message(sd->fd, "Your PK state is now ON");
    +			sd->pk_mode_tick = tick + 300000; //set the delay here
    +		}
    +	}
    +	return true;
    +}
    +

     


  5. How can I make Charge Attack, Body Relocation,Back Sliding, Flying Side Kick, High Jump, Shadow Jump fail when they are trapped in Spider Web and Ankle Snare?

     

    I tried on body relocation by adding this lines, The anklesnare skill fail when body reloacating works but the spider web skill fail wont work. I can still body reloc.

    	// Block skill usage while you have SC_SPIDERWEB AND ANKLESNARE status
    		if(sc && (sc->data[SC_SPIDERWEB] || sc->data[SC_ANKLESNARE]))
    				break;

    Also How can i make the Spider Web works like Ankle snare trap by placing on floors not casting on player.


  6. On 4/4/2020 at 6:35 AM, Caspian said:

    I don't know, I think the plugin was made exactly to this... to enable people to fight on other maps instead of pvp areas.

    Hi, did you tried pk by dastgir using latest hercules?

    Same problem as mine, Compiling has no errors but when you toggle PK ON on both character they cant attack each other (Normal Attack or Skill) - This is when PK mode on misc.conf is disabled.

    But I also tried to Enable PK mode on misc.conf, and use dastgir PK plugin. Toggling ON makes both player attack each other but when both or one of character toggle PK OFF. They can still hit each other.

     

    Seems the PK plugin by dastgir wont work on my latest herc.


  7. Hi anyone can update on this? This is way back 2018,\

    Anyone can update this plugin? I have working plugin with no errors but the problem is It doesnt change the status of player (PK ON / OFF)

    It will be a great help for us using Herc Plugin features, but this is outdated and needs to fix.

    //===== Hercules Plugin ======================================
    //= @pk command
    //===== By: ==================================================
    //= AnnieRuru (v1.1)
    //===== Modified By: =========================================
    //= Dastgir
    //===== Current Version: =====================================
    //= v1.3
    //===== Compatible With: ===================================== 
    //= Hercules
    //===== Description: =========================================
    //= PK Mode
    //===== Topic ================================================
    //= http://herc.ws/board/topic/11004-/
    //============================================================
    
    #include "common/hercules.h"
    #include <stdio.h>
    #include <string.h>
    #include <stdlib.h>
    
    #include "map/atcommand.h"
    #include "map/battle.h"
    #include "map/clif.h"
    #include "map/map.h"
    #include "map/pc.h"
    
    #include "common/memmgr.h"
    
    #include "plugins/HPMHooking.h"
    #include "common/HPMDataCheck.h"
    
    HPExport struct hplugin_info pinfo = {
    	"@pk",
    	SERVER_TYPE_MAP,
    	"1.3",
    	HPM_VERSION,
    };
    
    // bitwise checking
    enum {
    	PK_ENABLE_TOWN = 1,
    	PK_ENABLE_OTHER = 2,
    	PK_ENABLE_ALL = 3,
    };
    
    int config_delay = 5; // After turn pk on/off, how many seconds delay before the player allow to pk on/off ?
    
    // maps where @pk command can be used
    int enable_maps = PK_ENABLE_TOWN;
    // Which map player can actually pk
    int pk_maps = PK_ENABLE_ALL;
    
    struct player_data {
    	unsigned int pkmode :1;
    	int pkmode_delay;
    };
    
    ACMD(pk)
    {
    	struct player_data *ssd;
    	char output[CHAT_SIZE_MAX];
    	if (!( ssd = getFromMSD(sd,0))) {
    		CREATE(ssd, struct player_data, 1);
    		ssd->pkmode = 0;
    		addToMSD(sd, ssd, 0, true);
    	}
    	if ((enable_maps&PK_ENABLE_ALL) == 0 && (enable_maps&PK_ENABLE_TOWN) > 0 && !map->list[sd->bl.m].flag.town) {
    		clif->message(sd->fd, "You can only change your PK state in towns.");
    		return false;
    	}
    	if ((enable_maps&PK_ENABLE_ALL) == 0 && (enable_maps&PK_ENABLE_OTHER) > 0 && map->list[sd->bl.m].flag.town) {
    		clif->message(sd->fd, "You cannot change your PK state in towns.");
    		return false;
    	}
    	if (ssd->pkmode_delay + config_delay > (int)time(NULL)) {
    		safesnprintf(output, CHAT_SIZE_MAX, "You must wait %d seconds before using this command again.", ssd->pkmode_delay + config_delay - (int)time(NULL));
    		clif->message(sd->fd, output);
    		return false;
    	}
    	if (ssd->pkmode == 0) {
    		ssd->pkmode = 1;
    		clif->message(sd->fd, "Your PK state is now ON");
    	} else {
    		ssd->pkmode = 0;
    		clif->message(sd->fd, "Your PK state is now OFF");
    	}
    	ssd->pkmode_delay = (int)time(NULL);
    	return true;
    }
    
    int battle_check_target_post(int retVal, struct block_list *src, struct block_list *target, int flag)
    {
    	if (retVal != 1 && src->type == BL_PC && target->type == BL_PC) {
    		struct map_session_data *sd = BL_CAST(BL_PC, src);
    		struct map_session_data *targetsd = BL_CAST(BL_PC, target);
    
    		if ((pk_maps&PK_ENABLE_TOWN && map->list[sd->bl.m].flag.town) || (pk_maps&PK_ENABLE_OTHER && map->list[sd->bl.m].flag.town)) {
    			if (sd->status.account_id != targetsd->status.account_id) {
    				struct player_data *src_pc = getFromMSD(sd, 0);
    				struct player_data *target_pc = getFromMSD(targetsd, 0);
    				if (src_pc != NULL && target_pc != NULL && src_pc->pkmode && target_pc->pkmode) {
    					hookStop();
    					return 1;
    				}
    			}
    		}
    	}
    	return retVal;
    }
    
    HPExport void plugin_init(void)
    {
    	addAtcommand("pk", pk);
    	addHookPost(battle, check_target, battle_check_target_post);
    }
    
    HPExport void server_online(void)
    {
    	ShowInfo("'%s' Plugin by Dastgir/Hercules. Version '%s'\n", pinfo.name, pinfo.version);
    }

     


  8. Heres the script

    //===== Hercules Plugin ======================================
    //= Soul Link Boost: Single Strip bypass FCP 
    //===== By: ==================================================
    //= Dastgir/Hercules
    //===== Current Version: =====================================
    //= 1.0
    //===== Description: =========================================
    //= Related Topic:
    //= http://herc.ws/board/files/file/177-soul-link-boost-single-strip-bypass-fcp/
    //===== Changelog: ===========================================
    //= v1.0 - Initial Release.
    //===== 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/strlib.h"
    #include "common/timer.h"
    
    #include "map/battle.h"
    #include "map/clif.h"
    #include "map/guild.h"
    #include "map/map.h"
    #include "map/mob.h"
    #include "map/party.h"
    #include "map/pc.h"
    #include "map/skill.h"
    #include "map/status.h"
    
    #include "plugins/HPMHooking.h"
    #include "common/HPMDataCheck.h"
    
    HPExport struct hplugin_info pinfo =
    {
    	"SoulLink Boost(FCP Bypass)",
    	SERVER_TYPE_MAP,
    	"1.0",
    	HPM_VERSION,
    };
    
    int skill_castend_nodamage_id_pre(struct block_list **src_, struct block_list **bl_, uint16 *skill_id_, uint16 *skill_lv_, int64 *tick_, int *flag_)
    {
    	struct map_session_data *sd, *dstsd;
    	struct mob_data *dstmd;
    	struct status_data *sstatus, *tstatus;
    	struct status_change *tsc;
    	bool hookS = false;
    
    	struct block_list *src = *src_, *bl = *bl_;
    	uint16 skill_id = *skill_id_, skill_lv = *skill_lv_;
    	int64 tick = *tick_;
    	int flag = *flag_;
    	
    	int element = 0;
    	enum sc_type type;
    
    	if(skill_id > 0 && !skill_lv)
    		return 0; // [Celest]
    
    	nullpo_retr(1, src);
    	nullpo_retr(1, bl);
    
    	if (src->m != bl->m)
    		return 1;
    
    	sd = BL_CAST(BL_PC, src);
    
    	dstsd = BL_CAST(BL_PC, bl);
    	dstmd = BL_CAST(BL_MOB, bl);
    
    	if(bl->prev == NULL)
    		return 1;
    	if(status->isdead(src)) {
    		return 1;
    	}
    	
    	switch (skill_id) {
    		case RG_STRIPWEAPON:
    		case RG_STRIPSHIELD:
    		case RG_STRIPARMOR:
    		case RG_STRIPHELM:
    		case ST_FULLSTRIP:
    		case GC_WEAPONCRUSH:
    		case SC_STRIPACCESSARY:
    			hookS = true;
    			break;
    		default:
    			return 0;
    	}
    	if (src != bl && status->isdead(bl))
    		if (skill->castend_nodamage_id_dead_unknown(src, bl, &skill_id, &skill_lv, &tick, &flag))
    			return 1;
    
    	// Supportive skills that can't be cast in users with mado
    	if (sd && dstsd && pc_ismadogear(dstsd)) {
    		if (skill->castend_nodamage_id_mado_unknown(src, bl, &skill_id, &skill_lv, &tick, &flag))
    			return 0;
    	}
    
    	tstatus = status->get_status_data(bl);
    	sstatus = status->get_status_data(src);
    
    	type = status->skill2sc(skill_id);
    	tsc = status->get_sc(bl);
    
    
    	if (src != bl && type > SC_NONE
    	 && (element = skill->get_ele(skill_id, skill_lv)) > ELE_NEUTRAL
    	 && skill->get_inf(skill_id) != INF_SUPPORT_SKILL
    	 && battle->attr_fix(NULL, NULL, 100, element, tstatus->def_ele, tstatus->ele_lv) <= 0)
    		return 1; //Skills that cause an status should be blocked if the target element blocks its element.
    
    	map->freeblock_lock();
    	
    	switch (skill_id) {
    		case RG_STRIPWEAPON:
    		case RG_STRIPSHIELD:
    		case RG_STRIPARMOR:
    		case RG_STRIPHELM:
    		case ST_FULLSTRIP:
    		case GC_WEAPONCRUSH:
    		case SC_STRIPACCESSARY: {
    			unsigned short location = 0;
    			int d = 0, rate;
    
    			//Rate in percent
    			if (skill_id == ST_FULLSTRIP)
    				rate = 5 + 2*skill_lv + (sstatus->dex - tstatus->dex)/5;
    			else if (skill_id == SC_STRIPACCESSARY)
    				rate = 12 + 2 * skill_lv + (sstatus->dex - tstatus->dex)/5;
    			else
    				rate = 5 + 5*skill_lv + (sstatus->dex - tstatus->dex)/5;
    
    			if (rate < 5) rate = 5; //Minimum rate 5%
    
    			//Duration in ms
    			if (skill_id == GC_WEAPONCRUSH) {
    				d = skill->get_time(skill_id,skill_lv);
    				if (bl->type == BL_PC)
    					d += 1000 * ( skill_lv * 15 + ( sstatus->dex - tstatus->dex ) );
    				else
    					d += 1000 * ( skill_lv * 30 + ( sstatus->dex - tstatus->dex ) / 2 );
    			} else
    				d = skill->get_time(skill_id,skill_lv) + (sstatus->dex - tstatus->dex)*500;
    
    			if (d < 0)
    				d = 0; // Minimum duration 0ms
    
    			switch (skill_id) {
    			case RG_STRIPWEAPON:
    			case GC_WEAPONCRUSH:
    				location = EQP_WEAPON;
    				break;
    			case RG_STRIPSHIELD:
    				location = EQP_SHIELD;
    				break;
    			case RG_STRIPARMOR:
    				location = EQP_ARMOR;
    				break;
    			case RG_STRIPHELM:
    				location = EQP_HELM;
    				break;
    			case ST_FULLSTRIP:
    				location = EQP_WEAPON|EQP_SHIELD|EQP_ARMOR|EQP_HELM;
    				break;
    			case SC_STRIPACCESSARY:
    				location = EQP_ACC;
    				break;
    			}
    
    			//Special message when trying to use strip on FCP [Jobbie]
    			if (sd && skill_id == ST_FULLSTRIP && tsc && tsc->data[SC_PROTECTWEAPON] && tsc->data[SC_PROTECTHELM] && tsc->data[SC_PROTECTARMOR] && tsc->data[SC_PROTECTSHIELD])
    			{
    				clif->gospel_info(sd, 0x28);
    				break;
    			}
    			
    			// FCP
    			// By pass FCP when using single strip skills by 15%(requires Glistening Coat).
    			if (sd && tsc && sd->sc.data[SC_SOULLINK] && sd->sc.data[SC_SOULLINK]->val2 == SL_ROGUE && rand()%100 < 15 &&
    				((skill_id == RG_STRIPWEAPON && tsc->data[SC_PROTECTWEAPON]) ||
    				(skill_id == RG_STRIPSHIELD && tsc->data[SC_PROTECTSHIELD]) ||
    				(skill_id == RG_STRIPARMOR && tsc->data[SC_PROTECTARMOR]) ||
    				(skill_id == RG_STRIPHELM && tsc->data[SC_PROTECTHELM]))
    				) {
    				int item_id = 7139; // Glistening Coat
    				int ii;
    				ARR_FIND(0, MAX_INVENTORY, ii, sd->status.inventory[ii].nameid == item_id);
    				if (ii < MAX_INVENTORY) {
    					pc->delitem(sd, ii, 1, 0, 0, LOG_TYPE_CONSUME);
    					switch (skill_id) {
    						case RG_STRIPWEAPON:
    							status_change_end(bl, SC_PROTECTWEAPON, INVALID_TIMER);
    							sc_start(NULL, bl, SC_NOEQUIPWEAPON, 100, skill_lv, d);
    							break;
    						case RG_STRIPSHIELD:
    							status_change_end(bl, SC_PROTECTSHIELD, INVALID_TIMER);
    							sc_start(NULL, bl, SC_NOEQUIPSHIELD, 100, skill_lv, d);
    							break;
    						case RG_STRIPARMOR:
    							status_change_end(bl, SC_PROTECTARMOR, INVALID_TIMER );
    							sc_start(NULL, bl, SC_NOEQUIPARMOR, 100, skill_lv, d);
    							break;
    						case RG_STRIPHELM:
    							status_change_end(bl, SC_PROTECTHELM, INVALID_TIMER );
    							sc_start(NULL, bl, SC_NOEQUIPHELM, 100, skill_lv, d);
    							break;
    					}
    					clif->skill_nodamage(src,bl,skill_id,skill_lv,1);
    					break;
    				}
    			}
    
    			// Attempts to strip at rate i and duration d
    			if ((rate = skill->strip_equip(bl, location, rate, skill_lv, d)) || (skill_id != ST_FULLSTRIP && skill_id != GC_WEAPONCRUSH))
    				clif->skill_nodamage(src,bl,skill_id,skill_lv,rate);
    
    			// Nothing stripped.
    			if (sd && !rate){
        			  int item_id = 7139; // Glistening Coat
         			 int ii;
         			 ARR_FIND(0, MAX_INVENTORY, ii, sd->status.inventory[ii].nameid == item_id);
          				if (ii < MAX_INVENTORY) {
             			pc->delitem(sd, ii, 1, 0, 0, LOG_TYPE_CONSUME);
          				}
         			 clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
    			}
    			break;
    		}
    	}
    
    	if (skill_id != SR_CURSEDCIRCLE) {
    		struct status_change *sc = status->get_sc(src);
    		if( sc && sc->data[SC_CURSEDCIRCLE_ATKER] )//Should only remove after the skill had been casted.
    			status_change_end(src,SC_CURSEDCIRCLE_ATKER,INVALID_TIMER);
    	}
    
    	if (dstmd) { //Mob skill event for no damage skills (damage ones are handled in battle_calc_damage) [Skotlex]
    		mob->log_damage(dstmd, src, 0); //Log interaction (counts as 'attacker' for the exp bonus)
    		mob->skill_event(dstmd, src, tick, MSC_SKILLUSED|(skill_id<<16));
    	}
    
    	if (sd && !(flag&1)) { // ensure that the skill last-cast tick is recorded
    		sd->canskill_tick = timer->gettick();
    
    		if (sd->state.arrow_atk) { // consume arrow on last invocation to this skill.
    			battle->consume_ammo(sd, skill_id, skill_lv);
    		}
    		skill->onskillusage(sd, bl, skill_id, tick);
    		// perform skill requirement consumption
    		if (skill_id != NC_SELFDESTRUCTION)
    			skill->consume_requirement(sd,skill_id,skill_lv,2);
    	}
    
    	map->freeblock_unlock();
    	if (hookS)
    		hookStop();
    	return 0;
    }
    
    HPExport void plugin_init(void)
    {
    	addHookPre(skill, castend_nodamage_id, skill_castend_nodamage_id_pre);
    }
    
    HPExport void server_online(void)
    {
    	ShowInfo("'%s' Plugin by Dastgir/Hercules. Version '%s'\n", pinfo.name, pinfo.version);
    }

    and im getting this error when i run the plugin

     

    In function ‘skill_castend_nodamage_id_pre’:
    fcpbypass.c:234:10: error: too few arguments to function ‘clif->skill_fail’
              clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);


  9. Hello, I already browsed some of the Soul Link effect. Some left are I cannot find in any forums.. Can anyone help me thank you!

    Wizard

    - 150% Boost damage of Magic Crasher

    Priest

    - Gives 30% melee reflect damage to enemy attacking you, and Increase Heal Effectiveness by 300%

    Knight

    - All Skills reduced to 40% (like wearing Kiel Card)

    - Enable to use Level 10 Parrying with One-Hand Weapon with a block chance of 2*SkillLV%.

    Assassin

    - Increase damage of venom knife by 100%

    Alchemist
    - Acid Terror becomes a splash skill in an area of 4x4 around the targetted player or mob.

    Blacksmith
    - Full adrenaline rush gives Str +10, Dex +10 and Flee +15.
    - Maximum Power Thrust is buffed with +100% ATK, giving 300% ATK at Lv5.

    Rogue

    - Increase Double Strafe damage by (STR/2)%.


  10. Anyone knows why my script is not working? No errors when I tried to run but it doesn't remove status like Hallucination

    //===== Hercules Script ======================================
    //= Healer
    //===== By: ==================================================
    //= Euphy
    //===== Current Version: =====================================
    //= 1.2
    //===== Description: =========================================
    //= Basic healer script.
    //===== Additional Comments: =================================
    //= 1.0 Initial script.
    //= 1.1 Aligned coordinates with @go.
    //= 1.2 Fix variables and character stuck at healing
    //============================================================
    
    -	script	Healer	FAKE_NPC,{
    
    	.@price = 0;	// Zeny required for heal
    	.@Buffs = 1;	// Also buff players? (1: yes / 0: no)
    	.@Delay = 3;	// Heal delay, in seconds
    
    	if (@HD > gettimetick(2)) end;
    	if (.@price) {
    		message strcharinfo(PC_NAME),"Healing costs "+.@price+" Zeny.";
    		if (Zeny < .@price) end;
    		if(select("^0055FFHeal^000000", "^777777Cancel^000000") == 2) close;
    		Zeny -= .@price;
    	}
    	percentheal 100,100;
    	getinventorylist;
    	for( set .@i,0; .@i < @inventorylist_count; set .@i, .@i + 1 ) {
    	if ( @inventorylist_identify[.@i] == 1 ) continue;
    	delitem2 @inventorylist_id[.@i],1,0,0,0,0,0,0,0;
    	getitem @inventorylist_id[.@i],1;
    	}
            // Remove negative status effects
            for ( .@i = 0; .@i < getarraysize( .debuffs ); ++.@i ) {
                sc_end .debuffs[ .@i ];
            }
            // Repair equipment
            while( getbrokenid(1) ) {
                repairall;
            }
    	if (.@Buffs) {
    		sc_start SC_INC_AGI,240000,10;
    		sc_start SC_BLESSING,240000,10;
    	sc_end SC_STONE;
    	sc_end SC_SLOWDOWN;
    	sc_end SC_FREEZE;
    	sc_end SC_SLEEP;
    	sc_end SC_CURSE;
    	sc_end SC_SILENCE;
    	sc_end SC_CONFUSION;
    	sc_end SC_BLIND;
    	sc_end SC_BLEEDING;
    	sc_end SC_DECREASEAGI;
    	sc_end SC_POISON;
    	sc_end SC_HALLUCINATION;
    	sc_end SC_STRIPWEAPON;
    	sc_end SC_STRIPARMOR;
    	sc_end SC_STRIPHELM;
    	sc_end SC_STRIPSHIELD;
    	sc_end SC_CHANGEUNDEAD;
    	sc_end SC_ORCISH;
    	sc_end SC_BERSERK;
    	sc_end SC_SKE;
    	sc_end SC_SWOO;
    	sc_end SC_SKA;
    
    //		specialeffect(EF_INCAGILITY, AREA, playerattached()); sc_start SC_INC_AGI,240000,10;
    //		specialeffect(EF_BLESSING, AREA, playerattached()); sc_start SC_BLESSING,240000,10;
    	}
    	if (.@Delay) @HD = gettimetick(2)+.@Delay;
    	end;
    }
    
    
    // Duplicates
    //============================================================
    alberta,186,143,6	duplicate(Healer)	Healer#alb	1_F_PRIEST
    aldebaran,135,118,6	duplicate(Healer)	Healer#alde	1_F_PRIEST
    amatsu,200,79,4	duplicate(Healer)	Healer#ama	1_F_PRIEST
    ayothaya,207,169,6	duplicate(Healer)	Healer#ayo	1_F_PRIEST
    comodo,184,158,6	duplicate(Healer)	Healer#com	1_F_PRIEST
    einbech,57,36,6	duplicate(Healer)	Healer#einbe	1_F_PRIEST
    einbroch,57,202,6	duplicate(Healer)	Healer#einbr	1_F_PRIEST
    geffen,115,72,6	duplicate(Healer)	Healer#gef	1_F_PRIEST
    gonryun,156,122,6	duplicate(Healer)	Healer#gon	1_F_PRIEST
    hugel,89,150,6	duplicate(Healer)	Healer#hug	1_F_PRIEST
    izlude,125,118,5	duplicate(Healer)	Healer#izl	1_F_PRIEST
    jawaii,250,139,4	duplicate(Healer)	Healer#jaw	1_F_PRIEST
    lighthalzen,152,100,6	duplicate(Healer)	Healer#lhz	1_F_PRIEST
    louyang,212,43,5	duplicate(Healer)	Healer#lou	1_F_PRIEST
    manuk,272,144,6	duplicate(Healer)	Healer#man	1_F_PRIEST
    mid_camp,203,289,6	duplicate(Healer)	Healer#mid	1_F_PRIEST
    moc_ruins,72,164,4	duplicate(Healer)	Healer#moc	1_F_PRIEST
    morocc,153,97,6	duplicate(Healer)	Healer#mor	1_F_PRIEST
    moscovia,220,191,4	duplicate(Healer)	Healer#mos	1_F_PRIEST
    niflheim,212,182,5	duplicate(Healer)	Healer#nif	1_F_PRIEST
    payon,179,106,4	duplicate(Healer)	Healer#pay	1_F_PRIEST
    payon,163,229,4	duplicate(Healer)	Healer#pay2	1_F_PRIEST
    prontera,150,185,5	duplicate(Healer)	Healer#prt	1_F_PRIEST
    rachel,125,116,6	duplicate(Healer)	Healer#rac	1_F_PRIEST
    splendide,201,153,4	duplicate(Healer)	Healer#spl	1_F_PRIEST
    thor_camp,249,74,4	duplicate(Healer)	Healer#thor	1_F_PRIEST
    umbala,105,148,3	duplicate(Healer)	Healer#umb	1_F_PRIEST
    veins,217,121,4	duplicate(Healer)	Healer#ve	1_F_PRIEST
    xmas,143,136,4	duplicate(Healer)	Healer#xmas	1_F_PRIEST
    yuno,164,45,4	duplicate(Healer)	Healer#yuno	1_F_PRIEST
    
    // Duplicates (Renewal)
    //============================================================
    brasilis,194,221,6	duplicate(Healer)	Healer#bra	1_F_PRIEST
    dewata,195,187,4	duplicate(Healer)	Healer#dew	1_F_PRIEST
    dicastes01,201,194,4	duplicate(Healer)	Healer#dic	1_F_PRIEST
    ecl_in01,45,60,4	duplicate(Healer)	Healer#ecl	1_F_PRIEST
    malangdo,132,114,6	duplicate(Healer)	Healer#mal	1_F_PRIEST
    malaya,205,205,6	duplicate(Healer)	Healer#ma	1_F_PRIEST
    mora,55,152,4	duplicate(Healer)	Healer#mora	1_F_PRIEST

     


  11. 12 hours ago, meko said:

    the error message already tells you what is wrong: you forgot a closing parenthesis

    if ( getguildinfo(GUILDINFO_MASTER_NAME, getcharid( getcharid(2) ) != getcharid(0) )

    the parenthesis for getguildinto() is never closed: (((()) != ())

     

    you should add a ) closing parenthesis before the !=

    Thank you @meko, the script works without error now but I tried to claim by creating and changed the req_online into 2 to try it with max level dual

    the NPC will say nothing and stucked at his dialogue box

     


  12. Hello!

    I found this script on my old hercules files, This script checks the Guild member online count, Guild Level, and Guild members Level. I also don't know if the sql still works properly.. So here..

     

    Gpack.txt Script

    //4_F_ZONDAGIRL,4_M_EIN_SOLDIER
    prontera,164,155,4	script	Guild Package	4_ED_SCHMIDT,{	
    query_sql "SELECT guild_lv FROM guild WHERE guild_id = "+getcharid(2), .@guild_lv;
    .@req_online = 10; // how many players need to online to claim. 
    .@req_lv = 255; // minimum level of .@online players that has to be. 
    mes "[ ^007fffGuild Package^000000 ]";
    mes "Are you here to claim Guild Package?";
    mes "Here's our requirements:";
    mes "- Minimum of 10 members and must be online";
    mes "- All members must be ^ff0000Level 255^000000";
    mes "- Guild Level must be ^ff000050^000000";
    mes "All items you gain from Guild Package are ^ff8000Bound^000000 items.";
    mes "meaning items that gained cannot be traded to other account, sold, nor dropped.";
    next;
    mes "[ ^007fffGuild Package^000000 ]";
    mes "^007fff--- Guild Leader ---^000000";
    mes "- ^ff00001x^000000 ^009a4dGhostring Card^000000 ^ff8000(Bound)^000000";
    mes "- ^ff00001x^000000 ^009a4dThara Frog Card^000000 ^ff8000(Bound)^000000";
    mes "- ^ff00001x^000000 ^009a4dOrc Hero Card^000000 ^ff8000(Bound)^000000";
    mes "- ^ff00001x^000000 ^009a4dEvil Snake Lord Card^000000 ^ff8000(Bound)^000000";
    mes "- ^ff00001x^000000 ^009a4dRaydric Card^000000 ^ff8000(Bound)^000000";
    mes "- ^ff00001x^000000 ^009a4dGeneral Egnigem Cenia Card^000000 ^ff8000(Bound)^000000";
    mes "- ^ff00001x^000000 ^009a4dHollow Mask^000000 ^ff8000(Bound)^000000";
    mes "- ^ff00001x^000000 ^009a4dSilver Valkyrie Helm^000000 ^ff8000(Bound)^000000";
    mes "- ^ff00001x^000000 ^009a4dSilver Valkyrie Armor^000000 ^ff8000(Bound)^000000";
    mes "- ^ff00001x^000000 ^009a4dSilver Valkyrie Manteau^000000 ^ff8000(Bound)^000000";
    mes "- ^ff00001x^000000 ^009a4dSilver Valkyrie Shield^000000 ^ff8000(Bound)^000000";
    mes "- ^ff00001x^000000 ^009a4dSilver Valkyrie Shoes^000000 ^ff8000(Bound)^000000";
    mes "- ^ff000010x^000000 ^009a4dYggdrasilberry Box^000000";
    mes "- ^ff000010x^000000 ^009a4dCredits^000000";
    mes "- ^ff000050^000000 ^009a4dGaming Point^000000";
    mes "^0000FF[ Choose (1) Headprotector ]^000000";
    mes "- ^ff00001x^000000 ^009a4dEarth Headprotector^000000";
    mes "- ^ff00001x^000000 ^009a4dFire Headprotector^000000";
    mes "- ^ff00001x^000000 ^009a4dLightning Headprotector^000000";
    mes "- ^ff00001x^000000 ^009a4dSound Headprotector^000000";
    mes "- ^ff00001x^000000 ^009a4dWater Headprotector^000000";
    mes "- ^ff00001x^000000 ^009a4dWind Headprotector^000000";
    next;
    mes "[ ^007fffGuild Package^000000 ]";
    mes "^007fff-- Each Member --^000000";
    mes "- ^ff00001x^000000 ^009a4dGhostring Card^000000 ^ff8000(Bound)^000000";
    mes "- ^ff00001x^000000 ^009a4dThara Frog Card^000000 ^ff8000(Bound)^000000";
    mes "- ^ff00001x^000000 ^009a4dOrc Hero Card^000000 ^ff8000(Bound)^000000";
    mes "- ^ff00001x^000000 ^009a4dEvil Snake Lord Card^000000 ^ff8000(Bound)^000000";
    mes "- ^ff00001x^000000 ^009a4dRaydric Card^000000 ^ff8000(Bound)^000000";
    mes "- ^ff00001x^000000 ^009a4dGeneral Egnigem Cenia Card^000000 ^ff8000(Bound)^000000";
    mes "- ^ff00001x^000000 ^009a4dHollow Mask^000000 ^ff8000(Bound)^000000";
    mes "- ^ff00001x^000000 ^009a4dSilver Valkyrie Helm^000000 ^ff8000(Bound)^000000";
    mes "- ^ff00001x^000000 ^009a4dSilver Valkyrie Armor^000000 ^ff8000(Bound)^000000";
    mes "- ^ff00001x^000000 ^009a4dSilver Valkyrie Manteau^000000 ^ff8000(Bound)^000000";
    mes "- ^ff00001x^000000 ^009a4dSilver Valkyrie Shield^000000 ^ff8000(Bound)^000000";
    mes "- ^ff00001x^000000 ^009a4dSilver Valkyrie Shoes^000000 ^ff8000(Bound)^000000";
    mes "- ^ff00005x^000000 ^009a4dYggdrasilberry Box^000000";
    mes "- ^ff00005x^000000 ^009a4dCredits^000000";
    mes "- ^ff000050^000000 ^009a4dGaming Point^000000";
    mes "^0000FF[ Choose (1) Headprotector ]^000000";
    mes "- ^ff00001x^000000 ^009a4dEarth Headprotector^000000";
    mes "- ^ff00001x^000000 ^009a4dFire Headprotector^000000";
    mes "- ^ff00001x^000000 ^009a4dLightning Headprotector^000000";
    mes "- ^ff00001x^000000 ^009a4dSound Headprotector^000000";
    mes "- ^ff00001x^000000 ^009a4dWater Headprotector^000000";
    mes "- ^ff00001x^000000 ^009a4dWind Headprotector^000000";
    next;
    if ( !getcharid(2) ) 
    {		
    mes "[ ^007fffGuild Package^000000 ]";
    mes "You must have a guild";		
    close;	
    } else
    if (.@guild_lv < 50) 
    {
    mes "[ ^007fffGuild Package^000000 ]";
    mes "Your Guild must be level 50.";
    } else
    if ( getguildinfo(GUILDINFO_MASTER_NAME, getcharid( getcharid(2) ) != getcharid(0) ) 
    {		
    mes "[ ^007fffGuild Package^000000 ]";
    mes "You are not a Guild Leader";		
    close;	
    }
    getguildmember getcharid(2), 1;	
    getguildmember getcharid(2), 2;	
    for ( .@i = 0; .@i < $@guildmembercount; .@i++ )		
    if ( isloggedin( $@guildmemberaid[.@i], $@guildmembercid[.@i] ) )			
    .@online++;	if ( .@online < .@req_online ) 
    {		
    mes "[ ^007fffGuild Package^000000 ]";
    mes "Your Guild must have "+ .@req_online +" guild members online";		
    close;	
    }	
    	.@origin = getcharid(3);	
    		for ( .@i = 0; .@i < $@guildmembercount; .@i++ ) 
    	{		
    		if ( isloggedin( $@guildmemberaid[.@i], $@guildmembercid[.@i] ) ) 
    		{			
    			attachrid $@guildmemberaid[.@i];			
    			if ( BaseLevel < .@req_lv ) 
    		{				
    			.@deny_name$[.@c] = strcharinfo(0);				
    			.@c++;			
    		}		
    	}	
    }	attachrid .@origin;	if ( .@c ) 
    		{		
    			mes "[ ^007fffGuild Package^000000 ]";
    			mes "^ff0000"+ .@c +"^000000 of your Guild member does not meet the ^ff0000255^000000 level requirement";		
    			mes implode( .@deny_name$, "," );		
    			close;	
    		}	
    			for ( .@i = 0; .@i < $@guildmembercount; .@i++ ) 
    		{		
    			if ( isloggedin( $@guildmemberaid[.@i], $@guildmembercid[.@i] ) ) 
    			{			
    				attachrid $@guildmemberaid[.@i];			
    				if ( #guild_package_claimed ) 
    				{				
    				.@deny_name$[.@c] = strcharinfo(0);				
    				.@c++;			
    				}		
    			}	
    		}	
    		attachrid .@origin;	if ( .@c ) 
    		{		
    		mes "[ ^007fffGuild Package^000000 ]";
    		mes "there are "+ .@c +" members already claimed this package within their account";		
    		mes implode( .@deny_name$, "," );		
    		close;	
    		}	if ( query_sql( "select account_id as aaa, ( select last_ip from login where account_id = aaa ) as last_ip from guild_member where guild_id = "+ getcharid(2) +" group by last_ip", .@aid, .@ip$ ) < .@req_online ) 
    		{		
    		mes "[ ^007fffGuild Package^000000 ]";
    		mes "same ip detected";		
    		.@nb = query_sql( "select name, account_id as aaa, ( select last_ip from login where account_id = aaa ) as last_ip from guild_member where guild_id = "+ getcharid(2), .@name$, .@aid, .@ip$ );		
    		for ( .@i = 0; .@i < .@nb; .@i++ )			
    		mes "[ ^007fffGuild Package^000000 ]";
    		mes (.@i +1)+". "+ .@name$[.@i] +" ("+ .@ip$ +")";		
    		next;	
    		}	
    		mes "[ ^007fffGuild Package^000000 ]";
    		mes "Congratulations! Your Guild Package has been claimed!";	for ( .@i = 0; .@i < $@guildmembercount; .@i++ ) 
    		{		
    		if ( isloggedin( $@guildmemberaid[.@i], $@guildmembercid[.@i] ) ) 
    		{			
    		attachrid $@guildmemberaid[.@i];			
    		if ( getguildinfo(GUILDINFO_MASTER_NAME, getcharid( getcharid(2) ) != $@guildmembercid[.@i] )	
    		getitembound 13517,100,1; // Yggberry Box
    		else
    		getitembound 13517,50,1; // Yggberry Box
    		getitembound 14524,500,1; //SUPER B	
    		getitem 7227,500; // Voting Proof Ticket
    		getitem 20030,50; // Credits
    		getitembound 30110,50,1; // Box Of Thunder Box
    		getitembound 13973,50,1; // EDP Box
    		getitembound 4305,2,1; // Turtle
    		getitembound 4121,2,1; // Phreeoni
    		getitembound 4047,1,1; // Ghostring
    		getitembound 4352,1,1; // Gen Egnihem
    		getitembound 4058,1,1; //Thara Frog
    		getitembound 4143,1,1; //ORC HERO
    		getitembound 4330,1,1;//ESL
    		getitembound 4133,1,1; //Raydric
    		getitembound 20023,1,1; //Hollow
    		getitembound 20009,1,1; //SilverV
    		getitembound 20008,1,1; //SilverV
    		getitembound 20007,1,1; //SilverV
    		getitembound 20006,1,1; //SilverV
    		#guild_package_claimed = 1;		
    		}	
    	}	
    	attachrid .@origin;	close;
    OnInit:
    waitingroom "Guild Package? Claim it now!",0;
    end;	
    }

    Changes I already made is the depreciation of

    if ( getguildmasterid( getcharid(2) ) != getcharid(0) ) {

     

    Error, im getting

    Quote

    [Error]: script error in file 'npc/custom/gpack.txt' line 77 column 1
        parse_simpleexpr: unmatched ')'
        74: mes "Your Guild must be level 50.";
        75: } else
        76: if ( getguildinfo(GUILDINFO_MASTER_NAME, getcharid( getcharid(2) ) != getcharid(0) )
    *   77: {
            ^
        78: mes "[ ^007fffGuild Package^000000 ]";
        79: mes "You are not a Guild Leader";
        80: close;

     


  13. 50 minutes ago, 4144 said:

    this error because you doing something wrong. 

    or running already runned server, or connecting to other server.

    if you have more than one server on same host, better not use athena-start script and run each server manually

     

    Yes 2 server on same host, how can I change the trigger start script on other server?  Only my test server gets problematic the main server isn't affected


  14. 3 hours ago, 4144 said:

    probably you run more than one instance of your servers

    second instance failing with connection error.

     

    I have test server, 1 main server (running), 1 test server (running)...

    Main Server has default ports and the Test Server ports i changed into 6901, 6122, 5122 on conf folders it seems to work but sometimes its hard to connect to the test server and when I ./athena-start restart on Test Server. I will get the error I said above ;(


  15. Anyone can help me? I have tried this and it  doesn't remove curse status

    //===== Hercules Script ======================================
    //= Healer
    //===== By: ==================================================
    //= Euphy
    //===== Current Version: =====================================
    //= 1.2
    //===== Description: =========================================
    //= Basic healer script.
    //===== Additional Comments: =================================
    //= 1.0 Initial script.
    //= 1.1 Aligned coordinates with @go.
    //= 1.2 Fix variables and character stuck at healing
    //============================================================
    
    -	script	Healer	FAKE_NPC,{
    
    	.@price = 0;	// Zeny required for heal
    	.@Buffs = 0;	// Also buff players? (1: yes / 0: no)
    	.@Delay = 1;	// Heal delay, in seconds
    
    	if (@HD > gettimetick(2)) end;
    	if (.@price) {
    		message strcharinfo(PC_NAME),"Healing costs "+.@price+" Zeny.";
    		if (Zeny < .@price) end;
    		if(select("^0055FFHeal^000000", "^777777Cancel^000000") == 2) close;
    		Zeny -= .@price;
    	}
    	specialeffect(EF_HEAL2, AREA, playerattached()); percentheal 100,100;
    	getinventorylist;
    	for( set .@i,0; .@i < @inventorylist_count; set .@i, .@i + 1 ) {
    	if ( @inventorylist_identify[.@i] == 1 ) continue;
    	delitem2 @inventorylist_id[.@i],1,0,0,0,0,0,0,0;
    	getitem @inventorylist_id[.@i],1;
    	}
            // Remove negative status effects
            for ( .@i = 0; .@i < getarraysize( .debuffs ); ++.@i ) {
                sc_end .debuffs[ .@i ];
            }
            // Repair equipment
            while( getbrokenid(1) ) {
                repairall;
            }
    	if (.@Buffs) {
    		specialeffect(EF_INCAGILITY, AREA, playerattached()); sc_start SC_INC_AGI,240000,10;
    		specialeffect(EF_BLESSING, AREA, playerattached()); sc_start SC_BLESSING,240000,10;
    	}
    	if (.@Delay) @HD = gettimetick(2)+.@Delay;
    	end;
    }
    
    
    // Duplicates
    //============================================================
    alberta,186,143,6	duplicate(Healer)	Healer#alb	4_M_ALCHE_C
    aldebaran,135,118,6	duplicate(Healer)	Healer#alde	4_M_ALCHE_C
    amatsu,200,79,4	duplicate(Healer)	Healer#ama	4_M_ALCHE_C
    ayothaya,207,169,6	duplicate(Healer)	Healer#ayo	4_M_ALCHE_C
    comodo,184,158,6	duplicate(Healer)	Healer#com	4_M_ALCHE_C
    einbech,57,36,6	duplicate(Healer)	Healer#einbe	4_M_ALCHE_C
    einbroch,57,202,6	duplicate(Healer)	Healer#einbr	4_M_ALCHE_C
    geffen,115,72,6	duplicate(Healer)	Healer#gef	4_M_ALCHE_C
    gonryun,156,122,6	duplicate(Healer)	Healer#gon	4_M_ALCHE_C
    hugel,89,150,6	duplicate(Healer)	Healer#hug	4_M_ALCHE_C
    izlude,125,118,5	duplicate(Healer)	Healer#izl	4_M_ALCHE_C
    jawaii,250,139,4	duplicate(Healer)	Healer#jaw	4_M_ALCHE_C
    lighthalzen,152,100,6	duplicate(Healer)	Healer#lhz	4_M_ALCHE_C
    louyang,212,43,5	duplicate(Healer)	Healer#lou	4_M_ALCHE_C
    manuk,272,144,6	duplicate(Healer)	Healer#man	4_M_ALCHE_C
    mid_camp,203,289,6	duplicate(Healer)	Healer#mid	4_M_ALCHE_C
    moc_ruins,72,164,4	duplicate(Healer)	Healer#moc	4_M_ALCHE_C
    morocc,153,97,6	duplicate(Healer)	Healer#mor	4_M_ALCHE_C
    moscovia,220,191,4	duplicate(Healer)	Healer#mos	4_M_ALCHE_C
    niflheim,212,182,5	duplicate(Healer)	Healer#nif	4_M_ALCHE_C
    payon,179,106,4	duplicate(Healer)	Healer#pay	4_M_ALCHE_C
    payon,163,229,4	duplicate(Healer)	Healer#pay2	4_M_ALCHE_C
    prontera,151,185,4	duplicate(Healer)	Healer#prt	4_M_ALCHE_C
    rachel,125,116,6	duplicate(Healer)	Healer#rac	4_M_ALCHE_C
    splendide,201,153,4	duplicate(Healer)	Healer#spl	4_M_ALCHE_C
    thor_camp,249,74,4	duplicate(Healer)	Healer#thor	4_M_ALCHE_C
    umbala,105,148,3	duplicate(Healer)	Healer#umb	4_M_ALCHE_C
    veins,217,121,4	duplicate(Healer)	Healer#ve	4_M_ALCHE_C
    xmas,143,136,4	duplicate(Healer)	Healer#xmas	4_M_ALCHE_C
    yuno,164,45,4	duplicate(Healer)	Healer#yuno	4_M_ALCHE_C
    
    // Duplicates (Renewal)
    //============================================================
    brasilis,194,221,6	duplicate(Healer)	Healer#bra	4_M_ALCHE_C
    dewata,195,187,4	duplicate(Healer)	Healer#dew	4_M_ALCHE_C
    dicastes01,201,194,4	duplicate(Healer)	Healer#dic	4_M_ALCHE_C
    ecl_in01,45,60,4	duplicate(Healer)	Healer#ecl	4_M_ALCHE_C
    malangdo,132,114,6	duplicate(Healer)	Healer#mal	4_M_ALCHE_C
    malaya,205,205,6	duplicate(Healer)	Healer#ma	4_M_ALCHE_C
    mora,55,152,4	duplicate(Healer)	Healer#mora	4_M_ALCHE_C

     

×
×
  • Create New...

Important Information

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