Jump to content
  • 0

Refresh dialogue in real time?


GreenMagic793

Question


  • Group:  Members
  • Topic Count:  45
  • Topics Per Day:  0.01
  • Content Count:  157
  • Reputation:   18
  • Joined:  08/18/15
  • Last Seen:  

Hey guys,

 

So let's say we have an NPC with dialogue that changes. For example, a WoE NPC that shows who owns what castles. Now, if I click on that NPC right before a guild conquers Britoniah Guild Castle 2, for example, it will display the previous guild that owned the castle, but if I exit out of the NPC and then click on it again, it will display the new owners of the castle because I "refreshed" the NPC's dialogue.

 

My question is, can we actually refresh an NPC's dialogue without changing boxes or exiting out of the NPC? Would it be possible to create an NPC that immediately reflects any changes, such as conquered guild castles?

 

I would really like to get to the bottom of this. Any help, as always, is greatly appreciated.

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  54
  • Topics Per Day:  0.01
  • Content Count:  513
  • Reputation:   83
  • Joined:  08/11/12
  • Last Seen:  

agit_main.txt
look for "// Set new Castle Occupant"
// Set new Castle Occupant
setd "$LastCastleOwner"+strnpcinfo(2)+"$", getcastledata(strnpcinfo(2),1);
SetCastleData strnpcinfo(2),1, .@GID;

then you can use

//example payg_cas01
mes "Last Owner of Payg_cas01: "+$LastCastleOwnerpayg_cas01$;
Edited by jezznar
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  75
  • Topics Per Day:  0.02
  • Content Count:  2223
  • Reputation:   593
  • Joined:  10/26/11
  • Last Seen:  

I don't think there's a way to change/refresh 'mes' text once it's sent to the client. If the NPC is displaying text with waitingroom, you could have that refresh on a timer or triggered with doevent/donpcevent.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  54
  • Topics Per Day:  0.01
  • Content Count:  513
  • Reputation:   83
  • Joined:  08/11/12
  • Last Seen:  

 

agit_main.txt
look for "// Set new Castle Occupant"
// Set new Castle Occupant
setd "$LastCastleOwner"+strnpcinfo(2)+"$", getcastledata(strnpcinfo(2),1);
SetCastleData strnpcinfo(2),1, .@GID;

then you can use

//example payg_cas01
mes "Last Owner of Payg_cas01: "+$LastCastleOwnerpayg_cas01$;

 

well it'll refresh everytime you click it as long as you close the previous window

Edited by jezznar
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  45
  • Topics Per Day:  0.01
  • Content Count:  157
  • Reputation:   18
  • Joined:  08/18/15
  • Last Seen:  

Yeah unfortunately that just won't do, I need it to refresh on its own in real-time. But I appreciate your input.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  26
  • Topics Per Day:  0.01
  • Content Count:  350
  • Reputation:   43
  • Joined:  09/07/12
  • Last Seen:  

just a rough idea here,
try recursive call of function, `close2` might be helpful. ( Note: dont forget the delay ) /whisp

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  51
  • Topics Per Day:  0.01
  • Content Count:  452
  • Reputation:   33
  • Joined:  12/18/14
  • Last Seen:  

Would that refresh the opened dialogue? Quite skeptical to it and leaning to the way that it won't work at all. Though it would be great, for instance a clock ticking inside an NPC dialogue would be awesome, for instance counting the minutes or seconds left until the npc is activated would be a really awesome feature. (This is kinda related to what it is TS is saying/thinking)

This can be done using the waitingroom script command, however we do want to innovate, so why not try? xD

Edited by PandaLovesHamster
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  26
  • Topics Per Day:  0.01
  • Content Count:  350
  • Reputation:   43
  • Joined:  09/07/12
  • Last Seen:  

@panda, somewhat yes, i'm expecting that it will reopen the dialog with updated message.
This idea will be hard to work with multiple dialog(mes), or limited to single dialog(dialog with close button);

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...