Jump to content
Ind

Christmas Patch! Gift'o

Recommended Posts

I got a problem when testing the trader npc: 

I included the sample npc to test it and check how it works and i get this:

[Notice]: Conflicting var name 'Red_Potion', prioritising the script var[Error]: script_rid2sd: fatal error ! player not attached![Debug]: Function: tradertype (1 parameter):[Debug]: Data: variable name='NST_MARKET'[Debug]: Source (NPC): HaiMarket at prontera (150,160)[Warning]: script_get_val: cannot access player variable 'NST_MARKET', defaulting to 0[Error]: script_rid2sd: fatal error ! player not attached![Debug]: Function: tradertype (1 parameter):[Debug]: Data: variable name='NST_CUSTOM'[Debug]: Source (NPC): TestCustom2 at prontera (153,152)[Warning]: script_get_val: cannot access player variable 'NST_CUSTOM', defaulting to 0[Error]: script_rid2sd: fatal error ! player not attached![Debug]: Function: tradertype (1 parameter):[Debug]: Data: variable name='NST_CASH'[Debug]: Source (NPC): TestTraderCash at prontera (152,152)[Warning]: script_get_val: cannot access player variable 'NST_CASH', defaulting to 0[Error]: script_rid2sd: fatal error ! player not attached![Debug]: Function: sellitem (1 parameter):[Debug]: Data: variable name='Red_Potion'[Debug]: Source (NPC): Tool Dealer#ve at ve_in (243,303)[Warning]: script_get_val: cannot access player variable 'Red_Potion', defaulting to 0[Warning]: buildin_sellitem: unknown item id '0'![Debug]: Source (NPC): Tool Dealer#ve at ve_in (243,303)[Error]: script_rid2sd: fatal error ! player not attached![Debug]: Function: sellitem (1 parameter):[Debug]: Data: variable name='Red_Potion'[Debug]: Source (NPC): Tool Dealer#tu at tur_dun01 (158,54)[Warning]: script_get_val: cannot access player variable 'Red_Potion', defaulting to 0[Warning]: buildin_sellitem: unknown item id '0'![Debug]: Source (NPC): Tool Dealer#tu at tur_dun01 (158,54)[Error]: script_rid2sd: fatal error ! player not attached![Debug]: Function: sellitem (1 parameter):[Debug]: Data: variable name='Red_Potion'[Debug]: Source (NPC): Tool Dealer#ra at ra_in01 (257,269)[Warning]: script_get_val: cannot access player variable 'Red_Potion', defaulting to 0[Warning]: buildin_sellitem: unknown item id '0'![Debug]: Source (NPC): Tool Dealer#ra at ra_in01 (257,269)[Error]: script_rid2sd: fatal error ! player not attached![Debug]: Function: sellitem (1 parameter):[Debug]: Data: variable name='Red_Potion'[Debug]: Source (NPC): Tool Dealer#prt1 at prt_in (126,76)[Warning]: script_get_val: cannot access player variable 'Red_Potion', defaulting to 0[Warning]: buildin_sellitem: unknown item id '0'![Debug]: Source (NPC): Tool Dealer#prt1 at prt_in (126,76)[Error]: script_rid2sd: fatal error ! player not attached![Debug]: Function: sellitem (1 parameter):[Debug]: Data: variable name='Red_Potion'[Debug]: Source (NPC): Tool Dealer#prt at prt_fild05 (290,221)[Warning]: script_get_val: cannot access player variable 'Red_Potion', defaulting to 0[Warning]: buildin_sellitem: unknown item id '0'![Debug]: Source (NPC): Tool Dealer#prt at prt_fild05 (290,221)[Error]: script_rid2sd: fatal error ! player not attached![Debug]: Function: sellitem (1 parameter):[Debug]: Data: variable name='Red_Potion'[Debug]: Source (NPC): Tool Dealer#pay3 at payon (159,96)[Warning]: script_get_val: cannot access player variable 'Red_Potion', defaulting to 0[Warning]: buildin_sellitem: unknown item id '0'![Debug]: Source (NPC): Tool Dealer#pay3 at payon (159,96)[Error]: script_rid2sd: fatal error ! player not attached![Debug]: Function: sellitem (1 parameter):[Debug]: Data: variable name='Red_Potion'[Debug]: Source (NPC): Tool Dealer#pay2 at payon_in02 (87,34)[Warning]: script_get_val: cannot access player variable 'Red_Potion', defaulting to 0[Warning]: buildin_sellitem: unknown item id '0'![Debug]: Source (NPC): Tool Dealer#pay2 at payon_in02 (87,34)[Error]: script_rid2sd: fatal error ! player not attached![Debug]: Function: sellitem (1 parameter):[Debug]: Data: variable name='Red_Potion'[Debug]: Source (NPC): Tool Dealer#pay at payon_in01 (5,49)[Warning]: script_get_val: cannot access player variable 'Red_Potion', defaulting to 0[Warning]: buildin_sellitem: unknown item id '0'![Debug]: Source (NPC): Tool Dealer#pay at payon_in01 (5,49)[Error]: script_rid2sd: fatal error ! player not attached![Debug]: Function: sellitem (1 parameter):[Debug]: Data: variable name='Red_Potion'[Debug]: Source (NPC): Tool Dealer#mosk at mosk_in (21,254)[Warning]: script_get_val: cannot access player variable 'Red_Potion', defaulting to 0[Warning]: buildin_sellitem: unknown item id '0'![Debug]: Source (NPC): Tool Dealer#mosk at mosk_in (21,254)[Error]: script_rid2sd: fatal error ! player not attached![Debug]: Function: sellitem (1 parameter):[Debug]: Data: variable name='Red_Potion'[Debug]: Source (NPC): Tool Dealer#moc2 at moc_ruins (114,63)[Warning]: script_get_val: cannot access player variable 'Red_Potion', defaulting to 0[Warning]: buildin_sellitem: unknown item id '0'![Debug]: Source (NPC): Tool Dealer#moc2 at moc_ruins (114,63)[Error]: script_rid2sd: fatal error ! player not attached![Debug]: Function: sellitem (1 parameter):[Debug]: Data: variable name='Red_Potion'[Debug]: Source (NPC): Tool Dealer#moc1 at moc_ruins (91,128)[Warning]: script_get_val: cannot access player variable 'Red_Potion', defaulting to 0[Warning]: buildin_sellitem: unknown item id '0'![Debug]: Source (NPC): Tool Dealer#moc1 at moc_ruins (91,128)[Error]: script_rid2sd: fatal error ! player not attached![Debug]: Function: sellitem (1 parameter):[Debug]: Data: variable name='Red_Potion'[Debug]: Source (NPC): Tool Dealer#xmas at xmas_in (40,38)[Warning]: script_get_val: cannot access player variable 'Red_Potion', defaulting to 0[Warning]: buildin_sellitem: unknown item id '0'![Debug]: Source (NPC): Tool Dealer#xmas at xmas_in (40,38)[Error]: script_rid2sd: fatal error ! player not attached![Debug]: Function: sellitem (1 parameter):[Debug]: Data: variable name='Red_Potion'[Debug]: Source (NPC): Tool Dealer#lou at lou_in02 (239,176)[Warning]: script_get_val: cannot access player variable 'Red_Potion', defaulting to 0[Warning]: buildin_sellitem: unknown item id '0'![Debug]: Source (NPC): Tool Dealer#lou at lou_in02 (239,176)[Error]: script_rid2sd: fatal error ! player not attached![Debug]: Function: sellitem (1 parameter):[Debug]: Data: variable name='Red_Potion'[Debug]: Source (NPC): Tool Dealer#lhz2 at lhz_in03 (239,106)[Warning]: script_get_val: cannot access player variable 'Red_Potion', defaulting to 0[Warning]: buildin_sellitem: unknown item id '0'![Debug]: Source (NPC): Tool Dealer#lhz2 at lhz_in03 (239,106)[Error]: script_rid2sd: fatal error ! player not attached![Debug]: Function: sellitem (1 parameter):[Debug]: Data: variable name='Red_Potion'[Debug]: Source (NPC): Tool Dealer#yuno2 at yuno_in01 (25,34)[Warning]: script_get_val: cannot access player variable 'Red_Potion', defaulting to 0[Warning]: buildin_sellitem: unknown item id '0'![Debug]: Source (NPC): Tool Dealer#yuno2 at yuno_in01 (25,34)[Error]: script_rid2sd: fatal error ! player not attached![Debug]: Function: sellitem (1 parameter):[Debug]: Data: variable name='Red_Potion'[Debug]: Source (NPC): Tool Dealer#yuno at yuno (218,97)[Warning]: script_get_val: cannot access player variable 'Red_Potion', defaulting to 0[Warning]: buildin_sellitem: unknown item id '0'![Debug]: Source (NPC): Tool Dealer#yuno at yuno (218,97)[Error]: script_rid2sd: fatal error ! player not attached![Debug]: Function: sellitem (1 parameter):[Debug]: Data: variable name='Red_Potion'[Debug]: Source (NPC): Tool Dealer#hu at hu_in01 (241,368)[Warning]: script_get_val: cannot access player variable 'Red_Potion', defaulting to 0[Warning]: buildin_sellitem: unknown item id '0'![Debug]: Source (NPC): Tool Dealer#hu at hu_in01 (241,368)[Error]: script_rid2sd: fatal error ! player not attached![Debug]: Function: sellitem (1 parameter):[Debug]: Data: variable name='Red_Potion'[Debug]: Source (NPC): Tool Dealer#gon at gonryun (147,84)[Warning]: script_get_val: cannot access player variable 'Red_Potion', defaulting to 0[Warning]: buildin_sellitem: unknown item id '0'![Debug]: Source (NPC): Tool Dealer#gon at gonryun (147,84)[Error]: script_rid2sd: fatal error ! player not attached![Debug]: Function: sellitem (1 parameter):[Debug]: Data: variable name='Red_Potion'[Debug]: Source (NPC): Tool Dealer#gef at geffen_in (77,167)[Warning]: script_get_val: cannot access player variable 'Red_Potion', defaulting to 0[Warning]: buildin_sellitem: unknown item id '0'![Debug]: Source (NPC): Tool Dealer#gef at geffen_in (77,167)[Error]: script_rid2sd: fatal error ! player not attached![Debug]: Function: sellitem (1 parameter):[Debug]: Data: variable name='Red_Potion'[Debug]: Source (NPC): Paddler#ein at einbroch (82,199)[Warning]: script_get_val: cannot access player variable 'Red_Potion', defaulting to 0[Warning]: buildin_sellitem: unknown item id '0'![Debug]: Source (NPC): Paddler#ein at einbroch (82,199)[Error]: script_rid2sd: fatal error ! player not attached![Debug]: Function: sellitem (1 parameter):[Debug]: Data: variable name='Red_Potion'[Debug]: Source (NPC): Tool Dealer#ein at ein_in01 (189,15)[Warning]: script_get_val: cannot access player variable 'Red_Potion', defaulting to 0[Warning]: buildin_sellitem: unknown item id '0'![Debug]: Source (NPC): Tool Dealer#ein at ein_in01 (189,15)[Error]: script_rid2sd: fatal error ! player not attached![Debug]: Function: sellitem (1 parameter):[Debug]: Data: variable name='Red_Potion'[Debug]: Source (NPC): Tool Dealer#cmd2 at cmd_fild07 (257,126)[Warning]: script_get_val: cannot access player variable 'Red_Potion', defaulting to 0[Warning]: buildin_sellitem: unknown item id '0'![Debug]: Source (NPC): Tool Dealer#cmd2 at cmd_fild07 (257,126)[Error]: script_rid2sd: fatal error ! player not attached![Debug]: Function: sellitem (1 parameter):[Debug]: Data: variable name='Red_Potion'[Debug]: Source (NPC): Tool Dealer#cmd at cmd_in01 (79,182)[Warning]: script_get_val: cannot access player variable 'Red_Potion', defaulting to 0[Warning]: buildin_sellitem: unknown item id '0'![Debug]: Source (NPC): Tool Dealer#cmd at cmd_in01 (79,182)[Error]: script_rid2sd: fatal error ! player not attached![Debug]: Function: sellitem (1 parameter):[Debug]: Data: variable name='Red_Potion'[Debug]: Source (NPC): Tool Dealer#ayo at ayo_in01 (18,182)[Warning]: script_get_val: cannot access player variable 'Red_Potion', defaulting to 0[Warning]: buildin_sellitem: unknown item id '0'![Debug]: Source (NPC): Tool Dealer#ayo at ayo_in01 (18,182)[Error]: script_rid2sd: fatal error ! player not attached![Debug]: Function: sellitem (1 parameter):[Debug]: Data: variable name='Red_Potion'[Debug]: Source (NPC): Tool Dealer#ama at ama_in01 (24,30)[Warning]: script_get_val: cannot access player variable 'Red_Potion', defaulting to 0[Warning]: buildin_sellitem: unknown item id '0'![Debug]: Source (NPC): Tool Dealer#ama at ama_in01 (24,30)[Error]: script_rid2sd: fatal error ! player not attached![Debug]: Function: sellitem (1 parameter):[Debug]: Data: variable name='Red_Potion'[Debug]: Source (NPC): Tool Dealer#alde at aldeba_in (94,56)[Warning]: script_get_val: cannot access player variable 'Red_Potion', defaulting to 0[Warning]: buildin_sellitem: unknown item id '0'![Debug]: Source (NPC): Tool Dealer#alde at aldeba_in (94,56)[Error]: script_rid2sd: fatal error ! player not attached![Debug]: Function: sellitem (1 parameter):[Debug]: Data: variable name='Red_Potion'[Debug]: Source (NPC): Tool Dealer#alb2 at alberta_in (182,97)[Warning]: script_get_val: cannot access player variable 'Red_Potion', defaulting to 0[Warning]: buildin_sellitem: unknown item id '0'![Debug]: Source (NPC): Tool Dealer#alb2 at alberta_in (182,97)[Error]: script_rid2sd: fatal error ! player not attached![Debug]: Function: sellitem (1 parameter):[Debug]: Data: variable name='Red_Potion'[Debug]: Source (NPC): Tool Dealer#alb at alb2trea (87,65)[Warning]: script_get_val: cannot access player variable 'Red_Potion', defaulting to 0[Warning]: buildin_sellitem: unknown item id '0'!

Share this post


Link to post
Share on other sites

Its weird cant make the custom shop work? Am i missing some packets? Just trying to use the test one

 

use this for testing purpose

prontera,153,201,3  trader  Vote Shop  532,{

 OnInit:

 tradertype(NST_CUSTOM);

 sellitem 12263,20;

 sellitem 7619,30;

 sellitem 7620,30;

 sellitem 13960,150;

 sellitem 13607,200;

 sellitem 5372,150;

 sellitem 5360,150;

 sellitem 5137,200;

 sellitem 5389,250;

 sellitem 5580,250;

 sellitem 5132,250;

 end;

 

/* allows currency to be */

OnCountFunds:

 setcurrency(countitem(3004));

 end;

 

/* receives @price (total cost) */

OnPayFunds:

 if( countitem(3004) < @price )

   end;

 delitem 3004,@price;

 purchaseok();

 end;

}

its working however i really want to make a 1 npc using this script with category can someone help us ?

Share this post


Link to post
Share on other sites

[*] 

 

 

 

[*]NPC Market Shop

[*]This is the type I mentioned earlier, where item availability is limited

prontera,150,160,6	trader	HaiMarket	952,{OnInit:	tradertype(NST_MARKET);	sellitem Red_Potion,-1,50;	end;	OnClock0000://resupplies red potions on midnightOnMyResupply://instead of midnight, a event could trigger HaiMarket::OnMyResupply	if( shopcount(Red_Potion) < 50 )		sellitem Red_Potion,-1,50;	end;}
The quantity data is disaster-safe, I mean it is persistent to @reloadscript and server restarts (If there were 39 Red Potions on sale upon restart/reloadscript, it continues to be 39 instead of resetting back to 50).

[*]7 script commands to help control (documentation for all of them is present in script_commands.txt): openshop,sellitem,stopselling,setcurrency,tradertype,purchaseok,shopcount

 

Can we use also Currency on this NPC Market Shop? and how?

 

Thanks!

Share this post


Link to post
Share on other sites

 

[*] 

 

 

 

[*]NPC Market Shop

[*]This is the type I mentioned earlier, where item availability is limited

prontera,150,160,6	trader	HaiMarket	952,{OnInit:	tradertype(NST_MARKET);	sellitem Red_Potion,-1,50;	end;	OnClock0000://resupplies red potions on midnightOnMyResupply://instead of midnight, a event could trigger HaiMarket::OnMyResupply	if( shopcount(Red_Potion) < 50 )		sellitem Red_Potion,-1,50;	end;}
The quantity data is disaster-safe, I mean it is persistent to @reloadscript and server restarts (If there were 39 Red Potions on sale upon restart/reloadscript, it continues to be 39 instead of resetting back to 50).

[*]7 script commands to help control (documentation for all of them is present in script_commands.txt): openshop,sellitem,stopselling,setcurrency,tradertype,purchaseok,shopcount

 

Can we use also Currency on this NPC Market Shop? and how?

 

Thanks!

 

I don't think it is possible since it uses a different trade type :/

Share this post


Link to post
Share on other sites
prontera,150,160,6	trader	HaiMarket	952,{OnInit:	tradertype(NST_MARKET);	sellitem Red_Potion,-1,50;	end;	OnClock0000://resupplies red potions on midnightOnMyResupply://instead of midnight, a event could trigger HaiMarket::OnMyResupply	if( shopcount(Red_Potion) < 50 )		sellitem Red_Potion,-1,50;	end;} 

is it possible to use it on lower version ? i mean its fine w/o displaying the limit on client.

Share this post


Link to post
Share on other sites

Is it possible to change the currency using NST_market?

Edited by Zer Wildblood

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

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