jingz2k2

Member
jingz2k2 submitted a new resource:

Ticket Teleporters - #Teleporters that uses a ticket for use

Hello ServUO community,

Good morning/afternoon/evening. This is my first script.
I would like to share it with whoever may need it.

This is a teleporter that checks your backpack for the required item.
In this case, the required item is a Ticket in a form of a deed.

If the teleporter detects the ticket in the players' backpack, it will consume the ticket and proceeds to move the player to the location.

Usage:
1) Extract scripts to your Scripts/Custom/ folder.
2) [add TicketTele
3) [props...

Read more about this resource...
 
I like that. That could be very useful for running quests. Just curious though, why you used the utility.randomdouble? I ran through five tickets. Three got consumed on 1st use. One made 4 trips. One made 5 trips before being consumed. I realize it is easy enough to change the number to make always consume, if you really want to limit access, but I guess I am just curious what your using it for :)
 
I like that. That could be very useful for running quests. Just curious though, why you used the utility.randomdouble? I ran through five tickets. Three got consumed on 1st use. One made 4 trips. One made 5 trips before being consumed. I realize it is easy enough to change the number to make always consume, if you really want to limit access, but I guess I am just curious what your using it for :)

For me, I changed it so there wasn't a random at all so it would always consume it. I have leveling gear on my server and I intend to use this script so players have to pay gold to get it :p but there is limitless possibilities now that I figured it out to get it to always consume :3
Post automatically merged:

and what I mean is, basically they can go to a dungeon and level their gear faster.
 
Last edited:
Yes, it has great potential either way. I like making quests and this is a great way to let people into certain spots. Given out by the quest giver, only people on quest get in. I have a quest that the ticket expires in 6 hours, but that means you can use it multiple times, or sign off, and lose it. This way they can use it when they want - but only once. Or used in one-time events. Could be fun.
 
OMG I HAVE BEEN LOOKING FOR A SCRIPT JUST LIKE THIS Thank you so much!!!
Thank you. I am glad you found this useful.

I like that. That could be very useful for running quests. Just curious though, why you used the utility.randomdouble? I ran through five tickets. Three got consumed on 1st use. One made 4 trips. One made 5 trips before being consumed. I realize it is easy enough to change the number to make always consume, if you really want to limit access, but I guess I am just curious what your using it for :)
I used it in one of our harvest event to be able to mine exclusive wood and ore(using specific item id). The tickets were mainly a gold sink.

Yes, it has great potential either way. I like making quests and this is a great way to let people into certain spots. Given out by the quest giver, only people on quest get in. I have a quest that the ticket expires in 6 hours, but that means you can use it multiple times, or sign off, and lose it. This way they can use it when they want - but only once. Or used in one-time events. Could be fun.
Ah yes, timer is a good one for special mobs or quest.
 
If you want the ticket to delete find the section of the TicketTeleporter.cs that matches what I posted below:


if (ticket != null)
{
if (Utility.RandomDouble() <
0.75 || ticket.Insured || ticket.LootType == LootType.Blessed)
{
m.SendMessage("Your ticket is valid.");
}
else
{
ticket.Delete();
m.SendMessage("Your ticket disappears as you step onto the teleporter.");
}



Change the 0.75 to 0.0 and it will cause the ticket to always delete. Now I am not a coder but I think it says if the random value is greater than .75 (or 25% chance) then delete the ticket. So I switched it to say:

if (Utility.RandomDouble() < 0.0

So I believe this says if the value of the ticket is larger than 0.0 then delete the ticket. I ran a test of 10 tickets stepping onto the teleporter and it deleted the ticket all ten times. Since math is a foreign concept to me and I CAN NOT CODE my test is anecdotal. Good Luck!
Post automatically merged:

______________________________________________________________________________________________________________________________________________________________
BTW I had run across on a shard that charges you to use their dye tubs (no really) implementation of this script or one very similar to it. The shard I had found it on charged I think a $1 or .50 cents to buy one of these tickets.

On my shard I plan on using it as a gift for player event participation.
 
Am i right in thinking this isn't capable of handling players having multiple tickets for different destinations in their packs? That it will only check the 1st ticket it comes across in their pack and if it doesn't match the destination it will not teleport them?
 
Last edited:

Active Shards

Donations

Total amount
$0.00
Goal
$1,000.00
Back