Jump to content
  • 0

Unique exchanger


Santafe

Question


  • Group:  Members
  • Topic Count:  91
  • Topics Per Day:  0.02
  • Content Count:  325
  • Reputation:   34
  • Joined:  06/01/13
  • Last Seen:  

Hey everyone,

I would like to request a unique item exchanger. Lets say there are 4 items a,b,c,d. The exchanger can exchange item "a" for b/c/d / item "b" for a/c/d and so on. This exchanger also appears only at a particular day? like OnFriday with an OnClock ? and also there is an announcement when he arrives and leaves. He disappears after 1 hour (hidenpc?) 

Thanks and Regards ,

Santa :D

Link to comment
Share on other sites

15 answers to this question

Recommended Posts

  • 0

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2345
  • Joined:  10/28/11
  • Last Seen:  

something like this?

https://pastebin.com/24PDW2Cg

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  54
  • Topics Per Day:  0.01
  • Content Count:  342
  • Reputation:   169
  • Joined:  02/25/12
  • Last Seen:  

Can't test it, but this should more or less do the job

uniqueExchanger.txt

Tell me if there's an issue.

  • Upvote 1
  • Love 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  91
  • Topics Per Day:  0.02
  • Content Count:  325
  • Reputation:   34
  • Joined:  06/01/13
  • Last Seen:  

6 hours ago, Alayne said:

Can't test it, but this should more or less do the job

uniqueExchanger.txt

Tell me if there's an issue.

Hey Alayne thanx for the script, It works quite well but for some reason the npc isnt hidden i can see its shadow xD (guessing thats the 903 NPC ID)

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  70
  • Reputation:   21
  • Joined:  11/08/15
  • Last Seen:  

hideoffnpc strnpcinfo(3);

to

disablenpc strnpcinfo(0);

Maybe?

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  249
  • Reputation:   72
  • Joined:  10/20/12
  • Last Seen:  

Cool script @Alayne . I just want to give one little suggestion:

`@realRank` should either be a scope variable (preferably) or it should get cleared before usage.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  91
  • Topics Per Day:  0.02
  • Content Count:  325
  • Reputation:   34
  • Joined:  06/01/13
  • Last Seen:  

49 minutes ago, Scanty said:

hideoffnpc strnpcinfo(3);

to


disablenpc strnpcinfo(0);

Maybe?

Yea that actually worked, thanks! but i donno if it would reappear when the OnClock happens,

Also @Alayne the menu when I talk to npc seems to be messed up like, "What do you want to do" >> options are : 

3

exchange for carrot

i cant exchange for anything else but a carrot or a grape :o

Edited by Santafe
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  54
  • Topics Per Day:  0.01
  • Content Count:  342
  • Reputation:   169
  • Joined:  02/25/12
  • Last Seen:  

Yeah the disablenpc will disable it as said ans I dunno if when disabled the onclock, which is inside the same npc, will un hide it. To be tested. 

For the menu can you make a screen I don't understand sorry ^^'. The items are in the array you need to fill it I used dummy data. 

 

@jay yeah I first started with a scope but then thought 'what will happen if two player speak in the same time'? But the clear can be done, of course. 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  91
  • Topics Per Day:  0.02
  • Content Count:  325
  • Reputation:   34
  • Joined:  06/01/13
  • Last Seen:  

2 hours ago, Alayne said:

Yeah the disablenpc will disable it as said ans I dunno if when disabled the onclock, which is inside the same npc, will un hide it. To be tested. 

For the menu can you make a screen I don't understand sorry ^^'. The items are in the array you need to fill it I used dummy data. 

5a17c60f60c5a_Test1(5).thumb.jpg.776c3a221e64c67da9a75a8e9b35f3b0.jpg5a17c6042497b_Test1(3).thumb.jpg.899904b4cc1f2d5efb3e182fcdc2ef3c.jpg5a17c5fee51fc_Test1(2).thumb.jpg.276e81afaf479e37f3de44b6474b423c.jpg5a17c646b55bb_Test1(4).thumb.jpg.c6e90c4bb956c2bf064849a122674e9b.jpg5a17c646b55bb_Test1(4).thumb.jpg.c6e90c4bb956c2bf064849a122674e9b.jpg5a17c60f60c5a_Test1(5).thumb.jpg.776c3a221e64c67da9a75a8e9b35f3b0.jpg5a17c6042497b_Test1(3).thumb.jpg.899904b4cc1f2d5efb3e182fcdc2ef3c.jpg

The menu is split into 2 ( meaning, when i click the "3" option, it goes to a new option with 3 and exchange with carrot as a new menu again ) 

Edited by Santafe
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  54
  • Topics Per Day:  0.01
  • Content Count:  342
  • Reputation:   169
  • Joined:  02/25/12
  • Last Seen:  

Wow...I don't know how that's possible...Did you make some changes in the script?

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  91
  • Topics Per Day:  0.02
  • Content Count:  325
  • Reputation:   34
  • Joined:  06/01/13
  • Last Seen:  

28 minutes ago, Alayne said:

Wow...I don't know how that's possible...Did you make some changes in the script?

none, i just removed the hidenpc and onclock to test the script, nothing else

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  54
  • Topics Per Day:  0.01
  • Content Count:  342
  • Reputation:   169
  • Joined:  02/25/12
  • Last Seen:  

lol. I don't know where that "3" comes from. There's no item called like that, there's 4 item in the array...No logical reason ^^ I'll debug it in the week end.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  91
  • Topics Per Day:  0.02
  • Content Count:  325
  • Reputation:   34
  • Joined:  06/01/13
  • Last Seen:  

55 minutes ago, Emistry said:

something like this?

https://pastebin.com/24PDW2Cg

Yeaa thanks sir emistry works like a charm xD

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  91
  • Topics Per Day:  0.02
  • Content Count:  325
  • Reputation:   34
  • Joined:  06/01/13
  • Last Seen:  

@Emistry @Alayne

Just wanted to inform u guyz that "disablenpc strnpcinfo(n)" works and once timer reached ( for the npc to re appear, i had an "enablenpc strnpcinfo(n)" in OnInit instead of "hideoffnpc") and it appeared without errors and works well too! 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  145
  • Reputation:   1
  • Joined:  04/03/17
  • Last Seen:  

@Emistry hi , how about that script but when player try to use the exchanger it cost ITEMDI,AMOUNT and remove the timer or stay as a NPC. ? Thanks!

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  107
  • Topics Per Day:  0.02
  • Content Count:  770
  • Reputation:   69
  • Joined:  02/10/12
  • Last Seen:  

@Emistry or @Alaynecan u make different concept? like exchange item a b c d e just a= aple, b = carrot, c= redpot ......

Edited by melv0
Link to comment
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.   Paste as plain text instead

  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.

×
×
  • Create New...