Jump to content
  • 0
Sign in to follow this  
kerbiii

help in script

Question

script that will make your skillpoints and statpoints = 0

and how to apply this script

 

query_sql "DELETE * FROM `cart_inventory` WHERE `char_id` = '" +getcharid(0,""+strcharinfo(0)+"")+ "'";

Share this post


Link to post
Share on other sites

9 answers to this question

Recommended Posts

  • 0

Read up on: http://herc.ws/wiki/Query_sql even if it's an alternative way of doing it.

 

If I remember the script engine correctly this should work:

 

query_sql "DELETE * FROM `cart_inventory` WHERE `char_id` = "+getcharid(0);

But your question was how to apply it.

You can easily do so by placing it into any normal NPC and then talk to it.

 

Example:

prontera,150,150,0<tab>script<tab>stupidname<tab>85,{query_sql "DELETE * FROM `cart_inventory` WHERE `char_id` = '"+getcharid(0);end;}

However, be careful since it'll obviously delete all your inventory items.

 

The strcharinfo part is quite redundant, only useful if you want to get a different characters id.

Read up on: http://herc.ws/wiki/Getcharid for that part.

Edited by Nameless2you
According to what Patskie said

Share this post


Link to post
Share on other sites
  • 0
here's the sample script where to put it?map	script	sample	100,{	for ( .@i = 1; .@i < 15; .@i++ ) {		if ( getequipid(.@i) == -1 ) {			getinventorylist;			for ( set .@a, 0; .@a < @inventorylist_count; .@a++ ) {				delitem @inventorylist_id[.@a], @inventorylist_amount[.@a];			}			clearitem;			end;		}	}}

Share this post


Link to post
Share on other sites
  • 0

 

script that will make your skillpoints and statpoints = 0

 

StatusPoint = 0;SkillPoint = 0;

 

@kerbiii : No need to use getinventorylist and a loop to delete all items as the clearitem command will do the job. 

 

*clearitem;This command will destroy all items the invoking character has in theirinventory (including equipped items). It will not affect anything else,like storage or cart.

 

for ( .@i = 1; .@i < 15; .@i++ ) {	if ( getequipid(.@i) == -1 ) {		query_sql "DELETE FROM `cart_inventory` WHERE `char_id` = '" +getcharid(0)+ "'";		clearitem;		end;	}}

 

@Nameless2you : Syntax error. Should be :

 

query_sql "DELETE FROM `cart_inventory` WHERE `char_id` = '"+getcharid(0);

 

And besides sprite 150 on your script will result to an error. List of npc sprites :

Link : http://nn.nachtwolke.com/dev/npclist/?qq=1

Edited by Patskie

Share this post


Link to post
Share on other sites
  • 0

query_sql "DELETE * FROM `cart_inventory` WHERE `char_id` = '" +getcharid(0,""+strcharinfo(0)+"")+ "'";

 

This is meant to delete items from a player's cart?

 

why not use:

 

 

<header>,{    atcommand "@clearcart";    atcommand "@itemreset";    end;}
Edited by quesoph

Share this post


Link to post
Share on other sites
  • 0

 

query_sql "DELETE * FROM `cart_inventory` WHERE `char_id` = '" +getcharid(0,""+strcharinfo(0)+"")+ "'";

 

This is meant to delete items from a player's cart?

 

why not use:

 

 

<header>,{    atcommand "@clearcart";    atcommand "@itemreset";    end;}

this can work, only if your cart is on, can you give make me a script something like this

 

if ( BaseJob == Merchant )

No cart = ignore

with cart = talk

 

 

ah but i still need the sql cart deletion, to put it in OnPCLogoutEvent:

Edited by kerbiii

Share this post


Link to post
Share on other sites
  • 0

 

if ( BaseClass == Job_Merchant && checkcart() ) {	// talk}

thnx, one last thing the query sql cart deletion dont wipe the cart if the cart is turn off or removed, is there a way to delete even if the cart is Off or removed??

 

or maybe disable cart removal on specific map

 

 

 

 

done i solved it thnx for the help guys

Edited by kerbiii

Share this post


Link to post
Share on other sites
  • 0

You need to log out your character before you see the changes. I suggest you use @quesoph's proposal to use @clearcart command

prontera,150,150,0	script	Sample	100,{	atcommand "@clearcart";	end;}

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
Answer this question...

×   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...
Sign in to follow this  

×
×
  • Create New...

Important Information

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