![]() |
Arrow buying
I'm not very good at scripting so...
im trying to make a npc in a shop that takes gralats from you when you say Buy arrows. the script is like this: if (player.chat=Buyarrows); (playerdarts += 30); (tokenize 10); say2 here you go.; It gives me the arrows but it does not deduct it from my gralats. Help please?:confused: |
Quote:
PHP Code:
New Script: PHP Code:
Oh, and that is GS2, not GS1 which you used in your post. GS2 works better, so I suggest you learn that instead. There are some guides for GS2 scripting here: http://wiki.graal.net/index.php/Creation/Dev/GScript |
if your going to do a "system" for buying items, you could use a gui window instead :)
there's too muh player commands :( |
ok thanks now it's working
|
ok now its working
|
hmm
HTML Code:
function onPlayerChats() { |
Quote:
|
Quote:
|
Quote:
Some people prefix their functions in that fashion for added readability. This is largely because many jerks create unintuitive names for functions, or their code is haphazardly styled. In those cases the 'Find' feature can be rendered almost useless. As such, scanning for the 'on' prefix can be of use in those cases. For people who practice poor function and/or variable naming... !pissed! @ you. :D |
Quote:
|
Quote:
Also makes narrowing down for functions easier. |
Quote:
onSomeFunction() -or- someFunction() pointless, I know. xP |
1 Attachment(s)
I decided to help further by making you a GUI shopping system in which you can purchase bombs and arrows:
PHP Code:
|
Should check to see how many rupees is decreased serverside instead of clientside.
|
Quote:
|
All times are GMT +2. The time now is 11:40 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.