![]() |
Shops?
how can I make the script that when the player says the item name hes gets it and the money gets automcatically taken outta his pocket?
|
play with the rupee count its not hard at all
|
okay
im not gonna tell you the script, but ill give you some pointers and basic info, since you are obviously very new.
you will need to learn how to use these variables: #c, (the string that is determined by the players chat text) playerrupees, which is how many gelet, gralet, rupees, what ever you want to call them, that the player has the strequals command/flag setplayerprop command. So, lets use all of these, to make an example of how each work :) if (strequals(#c,happy duck) { playerrupees=99; setplayerprop #c,VERY happy duck; } So, this is when the player's chat text is "happy duck", the players money (playerrupees) is set to 99, and his chat text is set to "VERY happy duck" if you want to make sure that the player has enough money if (playerrupees>=5) { } that checks to see if the player has or has more than 5 rupees. >= means greater than or equal to. other signs: = equal, > greater than, < less than, <= less than or equal to, != not equal that should help somewhat if you can digest it. If you cannot, either im not very good at explaning, or you probably wont pick up scripting. |
...
|
I suggest you use
if (playerchats&&strequals(#c,buy whatever)&&!isweapon) the !isweapon part is important, cuz if its not there , then even after the player has the npc and he says buy whatever he would waste money lol |
umm
thats what the command
setplayerprop is for. just change their text like setplayerprop #c,<Item> Bought!; its their money, if they want to waste it, let them, lol. |
THNX
THNX ALOT:D
|
if u dont have it here it is as a freebie but i know people are just gonna modify it and get it down to .2 lines of code hehe :rolleyes:
if(playerchats&&strequals(#c,buy beer)&&playerrupees>=5){ playerrupees-=5; message YOU WERE HEALED!; //actually doesnt heal them MUAHAHAHAHA } |
| All times are GMT +2. The time now is 06:53 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.