so you mean like this ?
- script Sample::test -1,{
if ( !getcharid(2) ) end;
if ( !$@guild_owner1 && getcharid(2) ) {
if ( getguildmaster( getcharid(2) ) != strcharinfo(0) ) end;
mes .npc$;
mes "Buy me for " +.prize_of_npc+ " zeny.";
next;
mes .npc$;
if ( Zeny < .prize_of_npc )
mes "You don't have enough zeny";
else
Zeny -= .prize_of_npc;
$@guild_owner = getcharid(2);
announce "[" +getguildname($@guild_owner1)+ "] guild bought me for " +.prize_of_npc+ " zeny!",0;
close;
}
if ( getcharid(2) != $@guild_owner1 ) {
mes .npc$;
mes "This npc is not dedicated on your guild";
close;
}
mes .npc$;
mes "What you want me to do master?";
next;
switch(select("Heal Me:No thanks:" +(getguildmaster($@guild_owner1)==strcharinfo(0)?"Sell me":""))) {
case 1: percentheal 100,100; break;
case 2: break;
case 3: mes .npc$;
mes "Done!";
Zeny += .prize_of_npc;
announce getguildmaster($@guild_owner1)+ " sell me. Someone buy me!",0;
$@guild_owner = 0;
break;
default: debugmes "Error on NPC " +.npc$; break;
}
OnInit:
.prize_of_npc = 20;
.npc$ = strnpcinfo(1);
end;
}
prontera,150,150,0 duplicate(test) Sample 100
prontera,153,153,0 duplicate(test) Sample 100
or just change at
prontera,150,150,0 duplicate(test) Sample 100,{ getguildname("$@guild_owner",1) }
prontera,153,153,0 duplicate(test) Sample 100,{ getguildname("$@guild_owner",2) }