Jump to content
  • 0
Sign in to follow this  
Lord Ganja

automatic @at after creating a vending shop

Question

Is it possible for players to automatically use @autotrade command right after clicking the 'OK' button when vending?

 

Check this image for further explanation.

 

post-1008-0-72858500-1429027650_thumb.png

 

post-1008-0-76399600-1429027657_thumb.png

 

 

Thanks in advance!

Share this post


Link to post
Share on other sites

8 answers to this question

Recommended Posts

  • 0

@vending.c

safestrncpy(sd->message, message, MESSAGE_SIZE);clif->openvending(sd,sd->bl.id,sd->vending);clif->showvendingboard(&sd->bl,message,0);+atcommand->exec(sd->fd, sd, "@autotrade", true);idb_put(vending->db, sd->status.char_id, sd);} 

:meow:

Share this post


Link to post
Share on other sites
  • 0

Is it possible for players to automatically use @autotrade command right after clicking the 'OK' button when vending?

 

Check this image for further explanation.

 

attachicon.gifimg1.png

 

attachicon.gifimg2.png

 

 

Thanks in advance!

Its a good IDEA, just make it sure that u will not make a mistake in pricing after clicking the OK button or else u dont have time anymore in re checking it.. 

Share this post


Link to post
Share on other sites
  • 0

@vending.c

safestrncpy(sd->message, message, MESSAGE_SIZE);clif->openvending(sd,sd->bl.id,sd->vending);clif->showvendingboard(&sd->bl,message,0);+atcommand->exec(sd->fd, sd, "@autotrade", true);idb_put(vending->db, sd->status.char_id, sd);} 

:meow:

Thank you @@malufett. it's working! :)

 

btw as @@karazu mentioned,

 

 

Its a good IDEA, just make it sure that u will not make a mistake in pricing after clicking the OK button or else u dont have time anymore in re checking it.. 

 

 

can you make it like trigger a script so we could add a timer before it use @autotrade?

clif->showvendingboard(&sd->bl,message,0);+atcommand->exec(sd->fd, sd, "@autotrade", true); // CHANGE THIS ONE TO A CODE THAT WILL TRIGGER A SCRIPTidb_put(vending->db, sd->status.char_id, sd);

 

the script is like:

-	script	auto_autotrade	-1,{attachnpctimer ""+strcharinfo(0)+"";initnpctimer;// Added this so the vendor will have 10 seconds to recheck the vended items before it goes to autotrade modeOnTimer10000;	atcommand "@autotrade";	end; }

Share this post


Link to post
Share on other sites
  • 0

nah..you don't need that you can set it at 'conf/battle/misc.conf'

// Set this to the amount of minutes autotrade chars will be kicked from the server.at_timeout: 0

:meow:

Share this post


Link to post
Share on other sites
  • 0

nah..you don't need that you can set it at 'conf/battle/misc.conf'

// Set this to the amount of minutes autotrade chars will be kicked from the server.at_timeout: 0

:meow:

Oh, I mean, like the script will be triggered before it enters autotrade mode..

 

at_timeout works like, vendors which are already in autotrade mode will be kicked from server.

Share this post


Link to post
Share on other sites
  • 0

you can use 'bindatcmd'

 

:meow:

Damn. Yeah. Haven't think of that  :hmm:

 

anyway last question, what do I have to change with atcommand->exec to trigger the bindatcmd?

 

I use this:

OnInit:

     bindatcmd("vendcheck","vend_check::OnVendCheck",100,100);

 

but when atcommand->exec(sd->fd, sd, "@vendcheck", true); is triggered, it says "@vendcheck is Unknown Command."

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.