Resource icon

Ticket Teleporters 1.0

No permission to download

jingz2k2

Gold Donator
Mar 4, 2016
34
6
8
31
Hong Kong
Shard Name
None Yet
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...
 

TheArt

Rookie
Oct 21, 2018
97
57
18
Shard Name
Planes of Etria
OMG I HAVE BEEN LOOKING FOR A SCRIPT JUST LIKE THIS Thank you so much!!!
 
  • Like
Reactions: jingz2k2

Tukaram

Squire
Jan 4, 2015
350
49
28
56
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 :)
 

TheArt

Rookie
Oct 21, 2018
97
57
18
Shard Name
Planes of Etria
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:

Tukaram

Squire
Jan 4, 2015
350
49
28
56
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.
 
  • Like
Reactions: TheArt

jingz2k2

Gold Donator
Mar 4, 2016
34
6
8
31
Hong Kong
Shard Name
None Yet
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.
 

Diesel

Gold Donator
Sep 7, 2014
160
36
28
55
Shard Name
Medival World 73.146.176.79
Works great thank you very much for this!
 

Diesel

Gold Donator
Sep 7, 2014
160
36
28
55
Shard Name
Medival World 73.146.176.79
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.