The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Travel Mage instead of a Travel Stone
Author Message
Khaos
Master
**

Posts: 595
Likes Given: 166
Likes Received: 83 in 51 posts
Joined: Mar 2012
Reputation: 11



Post: #3
RE: Travel Mage instead of a Travel Stone
Code:
on=*hi*
on=*hello*
say Hello there. For 100 gold I can send you to any city you'd like.
say Just say the name of the city you would like to go.

on=*Minoc*
if (!<src.restest 100 i_gold>)
say Sorry, but you don't have enough money for that.
return 1 // We will now end this conversation with the player until the player gets the mage's attention again.
endif
src.consumegold 100
src.go Minoc
return 1 // The player is gone. Let's remove his presence from the mage's attention.

This can be setup for every town possible. The original response lacked a consumption of the gold needed. Also, return 1 *should* clear the player from the mage's memory and allow his attention to be sought out with other players without waiting on a delay.

I also cannot point this out enough with programming. Try to do checks to fail the processing first. Because if you get too complicated with success coding, you would be putting a lot more strain on processing than needed.
(This post was last modified: 02-18-2016 08:26 AM by Khaos.)
02-18-2016 08:23 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Travel Mage instead of a Travel Stone - Khaos - 02-18-2016 08:23 AM

Forum Jump:


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