Code:
use uo;
include "include/spellRestrictions";
include "include/gumputil";
include "include/gumps";
program telestone(who, stone)
if (distance (who, stone) > 3)
SendSysMessage(who, "It is too far");
return;
endif
if (who.dead)
SendSysMessage(who, "You ghost");
return;
endif
TurnTowards(who, stone);
GFInitGump(0, 0);
// GFNoClose();
GFNoDispose();
GFPage(0);
GFResizePic(100, 100, 2600, 380, 340);
GFTextLine(170, 180, 0x0061, "Teleportation system.");
// Blue Towns
var britain := GFRadioButton(150, 200, 0x00D2, 0x00D3, 0);
GFTextLine(180, 200, 0x0061, "Britain");
var Vesper := GFRadioButton(150, 225, 0x00D2, 0x00D3, 0);
GFTextLine(180, 225, 0x0061, "Vesper");
var Minoc := GFRadioButton(150, 250, 0x00D2, 0x00D3, 0);
GFTextLine(180, 250, 0x0061, "Minoc");
var Moonglow := GFRadioButton(150, 275, 0x00D2, 0x00D3, 0);
GFTextLine(180, 275, 0x0061, "Moonglow");
var Cove := GFRadioButton(150, 300, 0x00D2, 0x00D3, 0);
GFTextLine(180, 300, 0x0061, "Cove");
var dp := GFRadioButton(150, 340, 0x00D2, 0x00D3, 0);
GFTextLine(180, 340, 51, "Duel Pits");
var market := GFRadioButton(150, 365, 0x00D2, 0x00D3, 0);
GFTextLine(180, 365, 51, "Market");
//Red Towns
var occlo := GFRadioButton(290, 200, 0x00D2, 0x00D3, 0);
GFTextLine(320, 200, 37, "Occlo");
var BuccaneersDen := GFRadioButton(290, 225, 0x00D2, 0x00D3, 0);
GFTextLine(320, 225, 37, "Buccaneers Den");
var MoonglowZoo := GFRadioButton(290, 250, 0x00D2, 0x00D3, 0);
GFTextLine(320, 250, 37, "Moonglow Zoo");
var SerpentsHold := GFRadioButton(290, 275, 0x00D2, 0x00D3, 0);
GFTextLine(320, 275, 37, "Serpents Hold");
var Magincia := GFRadioButton(290, 300, 0x00D2, 0x00D3, 0);
GFTextLine(320, 300, 37, "Magincia");
var cc := GFRadioButton(290, 340, 0x00D2, 0x00D3, 0);
GFTextLine(320, 340, 51, "Fight Club");
var newbiedang := GFRadioButton(290, 365, 0x00D2, 0x00D3, 0);
GFTextLine(320, 365, 71, "Newbie Dangeon");
var newbiemine := GFRadioButton(290, 390, 0x00D2, 0x00D3, 0);
GFTextLine(320, 390, 71, "Newbie Mine");
var go := GFButtonID(260, 120, 0x15E8, 0x15EA, 1);
var res := GFSendGump(who);
var x,y,z := 0;
if (res[britain.keyid])
x := 1419; y := 1699;
elseif (res[vesper.keyid])
x := 2891; y := 685;
elseif (res[minoc.keyid])
x := 2503; y := 555;
elseif (res[moonglow.keyid])
x := 4479; y := 1126;
elseif (res[cove.keyid])
x := 2243; y := 1213;
elseif (res[occlo.keyid])
x := 3651; y := 2516;
elseif (res[BuccaneersDen.keyid])
x := 2679; y := 2180;
elseif (res[MoonglowZoo.keyid])
x := 4494; y := 1382; z := 23;
elseif (res[SerpentsHold.keyid])
x := 2957; y := 3447;
elseif (res[Magincia.keyid])
x := 3673; y := 2280;
elseif (res[dp.keyid])
x := 5408; y := 1176;
elseif (res[market.keyid])
x := 5686; y := 1234;
elseif (res[newbiedang.keyid])
if (((GetEffectiveSkill(who, 1) <= 65.0)and(GetEffectiveSkill(who, 17) <= 65.0)
and(GetEffectiveSkill(who, 27) <= 65.0)and(GetEffectiveSkill(who, 31) <= 65.0)
and(GetEffectiveSkill(who, 40) <= 65.0)and(GetEffectiveSkill(who, 41) <= 65.0)
and(GetEffectiveSkill(who, 42) <= 65.0)and(GetEffectiveSkill(who, 43) <= 65.0)
and (GetEffectiveSkill(who, 25) <= 65.0)and(GetEffectiveSkill(who, 26) <= 65.0)
and (GetEffectiveSkill(who, 16) <= 65.0)and(GetEffectiveSkill(who, 5) <= 65.0))
or(who.cmdlevel > 1))
x := 5569; y := 1307;
else
SendSysMessage(who, "Your skills are too high. You have nothing to do there.");
return;
endif
elseif (res[newbiemine.keyid])
if (((GetEffectiveSkill(who, 1) <= 65.0)and(GetEffectiveSkill(who, 17) <= 65.0)
and(GetEffectiveSkill(who, 27) <= 65.0)and(GetEffectiveSkill(who, 31) <= 65.0)
and(GetEffectiveSkill(who, 40) <= 65.0)and(GetEffectiveSkill(who, 41) <= 65.0)
and(GetEffectiveSkill(who, 42) <= 65.0)and(GetEffectiveSkill(who, 43) <= 65.0)
and (GetEffectiveSkill(who, 25) <= 65.0)and(GetEffectiveSkill(who, 26) <= 65.0)
and (GetEffectiveSkill(who, 16) <= 65.0)and(GetEffectiveSkill(who, 5) <= 65.0))
and (GetEffectiveSkill(who, 45))
or(who.cmdlevel > 1))
x := 5144; y := 1836;
else
SendSysMessage(who, "Your skills are too high. You have nothing to do there.");
return;
endif
elseif (res[cc.keyid])
x := 1523; y := 1467;
endif
if(res[go.keyid])
if (distance (who, stone) > 3)
SendSysMessage(who, "It is too far");
return;
endif
if (who.dead)
SendSysMessage(who, "You ghost");
return;
endif
sleep(3);
if (who.dead)
SendSysMessage(who, "You ghost");
return;
endif
endif
var oldx := who.x;
var oldy := who.y;
var oldz := who.z;
MoveCharacterToLocation( who, x, y, z );
if (!who.cmdlevel)
PlayStationaryEffect(oldx, oldy, oldz, 14120, 10, 0x13 );
PlaySoundEffect(who,0x01ff);
PlayObjectCenteredEffect(who, 14120, 10, 0x13 );
endif
endprogram
Your welcome!