Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Referring Problem
Author Message
pinku
Journeyman
*

Posts: 118
Likes Given: 4
Likes Received: 2 in 2 posts
Joined: Apr 2013
Reputation: 4



Post: #1
Referring Problem
Hey all!

I want to refer & log a player who bought something from my DIALOG.
However, I didn't find the right way to do this..

When you say BUY, the NPC will open a DIALOG.
On clicking button 1, you try to buy...

Code:
...
...
ONBUTTON=1
IF (<SRC.GOLD> >= <tag.bla>)
SRC.NEWITEM = <tag.blabla>
SRC.ACT.BOUNCE
SRC.GOLD -= <tag.bla>
SERV.LOG <SRC.ACCOUNT>:<SRC.NAME>:<SRC.UID> bought a <tag.bla> for <tag.blabla>.
...
...

My problem is that on "SERV.LOG" I can't refer to the player who bought the item. It always refer to nothing or to the NPC. I believe I tried everything, even non sense for this. (CONT, OBJ, whatever else), so I'm clearly doing something wrong. c_c

Most of times it shows 0:0:0 or NPC_NAME:NPC_UID.

What is the possible solution for this?

Thanks for reading & for your patience!
10-01-2013 06:40 PM
Find all posts by this user Like Post Quote this message in a reply
XuN
Sphere Developer
*****

Posts: 852
Likes Given: 102
Likes Received: 156 in 119 posts
Joined: Jul 2013
Reputation: 30



Post: #2
RE: Referring Problem
How do you call that dialog?, on WHO?

ON=Buy
dialog d_buy//will open the dialog ON npc with SRC yourself

src.dialog d_buy//will open the dialog on YOURSELF so you DON'T need src
10-01-2013 07:33 PM
Find all posts by this user Like Post Quote this message in a reply
pinku
Journeyman
*

Posts: 118
Likes Given: 4
Likes Received: 2 in 2 posts
Joined: Apr 2013
Reputation: 4



Post: #3
RE: Referring Problem
Funny..

When I tried just DIALOG and SERV.LOG <NAME>:<ACCOUNT>:<UID>, it did not work for me. It logged the NPC name.

Now that I called the dialog with SRC.DIALOG and SERV.LOG <SRC.NAME>:<SRC.ACCOUNT>:<SRC.UID> it works just fine...

well, thank you XuN! Much appreciated help!
(This post was last modified: 10-01-2013 07:51 PM by pinku.)
10-01-2013 07:49 PM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)