(solved)New Teleporter error - share-it!

For any problems with Dawn of Light website or game server, please direct questions and problems here.

Moderator: Support Team

(solved)New Teleporter error - share-it!

Postby Joku » Sat Oct 18, 2014 5:09 pm

Hi there guys,

well, my server project is nearly finished, just a few small things have to be done.
one thing i couldn`t get fixed is this Teleporter Script, with the following error message,
i cant figure out to get this important thing running, could anybody help me out, please!?

TELEPORTER SCRIPT:
Code: Select all
// Created by Dread, edited by Joku. To use just /mob create DOL.GS.Scripts.EasyTeleporter... using System; using DOL; using DOL.GS; using DOL.Events; using DOL.GS.PacketHandler; using System.Collections; using DOL.Database; namespace DOL.GS.Scripts { public class EasyTeleporter : GameNPC { public override bool Interact(GamePlayer player) { if (!base.Interact(player)) return false; player.Client.Out.SendMessage( "Welcome Traveler! - I can teleport you to the following locations.\n" + "\n[Setup] - The Main Merchant Area, where you can buy all Game-Content.\n" + "\n[Duel Zone] - Show your Duel-talent! - follow the given rules!\n" + "\n[Leveling Zone] - Level you character here. But be aware PvP is enabled!\n" + "\n[RvR/PvP Area] - Claim Towers and Keeps - RP-Claim Bonus active!.\n" + "\n[Master Level Area] - Fight against the ML-Encounters, group up for success!.\n" + "\n[Special PvE Event] - Comming up soon!\n", eChatType.CT_Say, eChatLoc.CL_PopupWindow); return true; } public override bool AddToWorld() { base.AddToWorld(); return true; } private static void switchrealm(GamePlayer p, int realm) { p.Realm = (eRealm)realm; p.Client.SavePlayer(); } public override bool WhisperReceive(GameLiving source, string str) { if (!base.WhisperReceive(source, str)) return false; if (!(source is GamePlayer)) return false; GamePlayer player = (GamePlayer)source; TurnTo(player.X, player.Y); switch (str) { case "Setup": { player.MoveTo(240, 554371, 583883, 6592, 2039); break; } break; case "Duel Zone": { player.MoveTo(240, 554371, 583883, 6592, 2039); break; } break; case "Leveling Zone": player.Client.Out.SendMessage( "wich entrance do you prefer, the [Albion-Entrance] the [Midgard-Entrance] or the [Hibernia-Entrance]?"); return true; case "Albion-Entrance": { player.MoveTo(240, 554371, 583883, 6592, 2039); break; } break; case "Midgard-Entrance": { player.MoveTo(240, 554371, 583883, 6592, 2039); break; } break; case "Hibernia-Entrance": { player.MoveTo(240, 554371, 583883, 6592, 2039); break; } break; case "RvR - Raid Area": player.Client.Out.SendMessage( "for wich realm would you like to fight? [Albion] X [Midgard] X [Hibernia]"); return true; case "Albion": { player.MoveTo(240, 554371, 583883, 6592, 2039); break; } break; case "Midgard": { player.MoveTo(240, 554371, 583883, 6592, 2039); break; } break; case "Hibernia": { player.MoveTo(240, 554371, 583883, 6592, 2039); break; } break; case "Master Level Area": { player.MoveTo(240, 554371, 583883, 6592, 2039); break; } break; case "Special PvE Event": { player.MoveTo(240, 554371, 583883, 6592, 2039); break; } break; } return true; } } }
ERROR MESSAGE:
Code: Select all
17:31:58,880 - [MAIN] - ERROR - DOL.GS.ScriptMgr - Script compilation failed because: 17:31:58,881 - [MAIN] - ERROR - DOL.GS.ScriptMgr - Keine Überladung für die Methode 'SendMessage' nimmt 1-Argumente an. 17:31:58,881 - [MAIN] - ERROR - DOL.GS.ScriptMgr - x:\DOL SERVER PROJEKT\RUNING SERVER\debug\scripts\Customtest\NewTeleporter.cs Line:82 Col:21 17:31:58,881 - [MAIN] - ERROR - DOL.GS.ScriptMgr - Script compilation failed because: 17:31:58,881 - [MAIN] - ERROR - DOL.GS.ScriptMgr - Keine Überladung für die Methode 'SendMessage' nimmt 1-Argumente an. 17:31:58,882 - [MAIN] - ERROR - DOL.GS.ScriptMgr - x:\DOL SERVER PROJEKT\RUNING SERVER\debug\scripts\Customtest\NewTeleporter.cs Line:106 Col:21
Thank you!!

Greetings Joku
Last edited by Joku on Sun Oct 19, 2014 8:51 pm, edited 1 time in total.
Joku
DOL Apprentice
 
Posts: 27
Joined: Wed Jul 30, 2014 11:28 am

Re: New Teleporter error - please help.

Postby elcotek » Sat Oct 18, 2014 10:10 pm

if all error change line 82 with
Code: Select all
player.Client.Out.SendMessage("wich entrance do you prefer, the [Albion-Entrance] the [Midgard-Entrance] or the [Hibernia-Entrance]?");
to
Code: Select all
player.Client.Out.SendMessage("wich entrance do you prefer, the [Albion-Entrance] the [Midgard-Entrance] or the [Hibernia-Entrance]?", eChatType.CT_System, eChatLoc.CL_PopupWindow);
Brotherland Final RvR/PvE/ToA http://brotherland.phpbb8.de/
User avatar
elcotek
Server Representative
 
Posts: 177
Joined: Mon May 12, 2008 9:28 pm
Website: http://brotherland-2.de
Location: Germany

Re: New Teleporter error - please help.

Postby Joku » Sun Oct 19, 2014 11:19 am

hi elcotek!

first, thank you for your reply and help!
i have changed the line to what you have told me, and the error is now replaced with another one,
so step one is done now :D - see the new error below,

ACTUAL SCRIPTS CODE
Code: Select all
// Created by Dread, To use just /mob create DOL.GS.Scripts.EasyTeleporter... // Please Change RegionNumber, X, Y, Z, Heading to acual gloc! // Easy to edit... // Enjoy using System; using DOL; using DOL.GS; using DOL.Events; using DOL.GS.PacketHandler; using System.Collections; using DOL.Database; namespace DOL.GS.Scripts { public class EasyTeleporter : GameNPC { public override bool Interact(GamePlayer player) { if (!base.Interact(player)) return false; player.Client.Out.SendMessage( "Welcome Traveler! - I can teleport you to the following locations.\n" + "\n[Setup] - The Main Merchant Area, where you can buy all Game-Content.\n" + "\n[Duel Zone] - Show your Duel-talent! - follow the given rules!\n" + "\n[Leveling Zone] - Level you character here. But be aware PvP is enabled!\n" + "\n[RvR/PvP Area] - Claim Towers and Keeps - RP-Claim Bonus active!.\n" + "\n[Master Level Area] - Fight against the ML-Encounters, group up for success!.\n" + "\n[Special PvE Event] - Comming up soon!\n", eChatType.CT_Say, eChatLoc.CL_PopupWindow); return true; } public override bool AddToWorld() { base.AddToWorld(); return true; } private static void switchrealm(GamePlayer p, int realm) { p.Realm = (eRealm)realm; p.Client.SavePlayer(); } public override bool WhisperReceive(GameLiving source, string str) { if (!base.WhisperReceive(source, str)) return false; if (!(source is GamePlayer)) return false; GamePlayer player = (GamePlayer)source; TurnTo(player.X, player.Y); switch (str) { case "Setup": { player.MoveTo(240, 554371, 583883, 6592, 2039); break; } break; case "Duel Zone": { player.MoveTo(240, 554371, 583883, 6592, 2039); break; } break; case "Leveling Zone": player.Client.Out.SendMessage("wich entrance do you prefer, the [Albion-Entrance] " + "the [Midgard-Entrance] or the [Hibernia-Entrance]?", eChatType.CT_System, eChatLoc.CL_PopupWindow); case "Albion-Entrance": { player.MoveTo(240, 554371, 583883, 6592, 2039); break; } break; case "Midgard-Entrance": { player.MoveTo(240, 554371, 583883, 6592, 2039); break; } break; case "Hibernia-Entrance": { player.MoveTo(240, 554371, 583883, 6592, 2039); break; } break; case "RvR - Raid Area": player.Client.Out.SendMessage("for wich realm would you like to fight?" + "[Albion] X [Midgard] X [Hibernia]", eChatType.CT_System, eChatLoc.CL_PopupWindow); return true; case "Albion": { player.MoveTo(240, 554371, 583883, 6592, 2039); break; } break; case "Midgard": { player.MoveTo(240, 554371, 583883, 6592, 2039); break; } break; case "Hibernia": { player.MoveTo(240, 554371, 583883, 6592, 2039); break; } break; case "Master Level Area": { player.MoveTo(240, 554371, 583883, 6592, 2039); break; } break; case "Special PvE Event": { player.MoveTo(240, 554371, 583883, 6592, 2039); break; } break; } return true; } } }
Code: Select all
13:15:41,575 - [MAIN] - ERROR - DOL.GS.ScriptMgr - Script compilation failed because: 13:15:41,576 - [MAIN] - ERROR - DOL.GS.ScriptMgr - Das Steuerelement kann nicht von einer case-Bezeichnung ('case "Leveling Zone":') could not continue to the next. 13:15:41,576 - [MAIN] - ERROR - DOL.GS.ScriptMgr - x:\DOL SERVER PROJEKT\RUNING SERVER\debug\scripts\Customtest\NewTeleporter.cs Line:81 Col:21
what could i use instead of the Case command in advance to the first text case ?

Ty. greetings Joku
Joku
DOL Apprentice
 
Posts: 27
Joined: Wed Jul 30, 2014 11:28 am

Re: New Teleporter error - please help.

Postby elcotek » Sun Oct 19, 2014 12:25 pm

there was double breaks,

like here:
Code: Select all
case "Setup": { player.MoveTo(240, 554371, 583883, 6592, 2039); break; } break;
i have removed for you, take this:
Code: Select all
// Created by Dread, edited by Joku. To use just /mob create DOL.GS.Scripts.EasyTeleporter... using System; using DOL; using DOL.GS; using DOL.Events; using DOL.GS.PacketHandler; using System.Collections; using DOL.Database; namespace DOL.GS.Scripts { public class EasyTeleporter : GameNPC { public override bool Interact(GamePlayer player) { if (!base.Interact(player)) return false; player.Client.Out.SendMessage( "Welcome Traveler! - I can teleport you to the following locations.\n" + "\n[Setup] - The Main Merchant Area, where you can buy all Game-Content.\n" + "\n[Duel Zone] - Show your Duel-talent! - follow the given rules!\n" + "\n[Leveling Zone] - Level you character here. But be aware PvP is enabled!\n" + "\n[RvR/PvP Area] - Claim Towers and Keeps - RP-Claim Bonus active!.\n" + "\n[Master Level Area] - Fight against the ML-Encounters, group up for success!.\n" + "\n[Special PvE Event] - Comming up soon!\n", eChatType.CT_Say, eChatLoc.CL_PopupWindow); return true; } public override bool AddToWorld() { base.AddToWorld(); return true; } private static void switchrealm(GamePlayer p, int realm) { p.Realm = (eRealm)realm; p.Client.SavePlayer(); } public override bool WhisperReceive(GameLiving source, string str) { if (!base.WhisperReceive(source, str)) return false; if (!(source is GamePlayer)) return false; GamePlayer player = (GamePlayer)source; TurnTo(player.X, player.Y); switch (str) { case "Setup": { player.MoveTo(240, 554371, 583883, 6592, 2039); break; } case "Duel Zone": { player.MoveTo(240, 554371, 583883, 6592, 2039); break; } case "Leveling Zone": player.Client.Out.SendMessage("wich entrance do you prefer, the [Albion-Entrance] the [Midgard-Entrance] or the [Hibernia-Entrance]?", eChatType.CT_System, eChatLoc.CL_PopupWindow); return true; case "Albion-Entrance": { player.MoveTo(240, 554371, 583883, 6592, 2039); break; } case "Midgard-Entrance": { player.MoveTo(240, 554371, 583883, 6592, 2039); break; } case "Hibernia-Entrance": { player.MoveTo(240, 554371, 583883, 6592, 2039); break; } case "RvR - Raid Area": player.Client.Out.SendMessage("for wich realm would you like to fight? [Albion] X [Midgard] X [Hibernia]", eChatType.CT_System, eChatLoc.CL_PopupWindow); return true; case "Albion": { player.MoveTo(240, 554371, 583883, 6592, 2039); break; } case "Midgard": { player.MoveTo(240, 554371, 583883, 6592, 2039); break; } case "Hibernia": { player.MoveTo(240, 554371, 583883, 6592, 2039); break; } case "Master Level Area": { player.MoveTo(240, 554371, 583883, 6592, 2039); break; } case "Special PvE Event": { player.MoveTo(240, 554371, 583883, 6592, 2039); break; } } return true; } } }
Brotherland Final RvR/PvE/ToA http://brotherland.phpbb8.de/
User avatar
elcotek
Server Representative
 
Posts: 177
Joined: Mon May 12, 2008 9:28 pm
Website: http://brotherland-2.de
Location: Germany

Re: New Teleporter error - please help.

Postby Joku » Sun Oct 19, 2014 8:50 pm

´ü
Last edited by Joku on Sun Oct 19, 2014 8:56 pm, edited 1 time in total.
Joku
DOL Apprentice
 
Posts: 27
Joined: Wed Jul 30, 2014 11:28 am

Re: (solved)New Teleporter error - share-it!

Postby Joku » Sun Oct 19, 2014 8:55 pm

elcotek! you are my hero :D!!

Thank you for the edit! - everything is working fine!
PS. This teleporter is now finished with help from elcotek, please be free and use it folks!
of course you have to edit the locations ;)!

working code here:
Code: Select all
// Created by Dread, edited by Joku&elcotek - To use just /mob create DOL.GS.Scripts.EasyTeleporter... using System; using DOL; using DOL.GS; using DOL.Events; using DOL.GS.PacketHandler; using System.Collections; using DOL.Database; namespace DOL.GS.Scripts { public class EasyTeleporter : GameNPC { public override bool Interact(GamePlayer player) { if (!base.Interact(player)) return false; player.Client.Out.SendMessage( "Welcome Traveler! - I can teleport you to the following locations.\n" + "\n[Setup] - The Main Merchant Area, where you can buy all Game-Content.\n" + "\n[Duel Zone] - Show your Duel-talent! - follow the given rules!\n" + "\n[Leveling Zone] - Level you character here. But be aware PvP is enabled!\n" + "\n[RvR/PvP Area] - Claim Towers and Keeps - RP-Claim Bonus active!.\n" + "\n[Master Level Area] - Fight against the ML-Encounters, group up for success!.\n" + "\n[Special PvE Event] - Comming up soon!\n", eChatType.CT_Say, eChatLoc.CL_PopupWindow); return true; } public override bool AddToWorld() { base.AddToWorld(); return true; } private static void switchrealm(GamePlayer p, int realm) { p.Realm = (eRealm)realm; p.Client.SavePlayer(); } public override bool WhisperReceive(GameLiving source, string str) { if (!base.WhisperReceive(source, str)) return false; if (!(source is GamePlayer)) return false; GamePlayer player = (GamePlayer)source; TurnTo(player.X, player.Y); switch (str) { case "Setup": { player.MoveTo(240, 554371, 583883, 6592, 2039); break; } case "Duel Zone": { player.MoveTo(240, 554371, 583883, 6592, 2039); break; } case "Leveling Zone": player.Client.Out.SendMessage("wich entrance do you prefer, the [Albion-Entrance] the [Midgard-Entrance] or the [Hibernia-Entrance]?", eChatType.CT_System, eChatLoc.CL_PopupWindow); return true; case "Albion-Entrance": { player.MoveTo(240, 554371, 583883, 6592, 2039); break; } case "Midgard-Entrance": { player.MoveTo(240, 554371, 583883, 6592, 2039); break; } case "Hibernia-Entrance": { player.MoveTo(240, 554371, 583883, 6592, 2039); break; } case "RvR - Raid Area": player.Client.Out.SendMessage("for wich realm would you like to fight? [Albion] X [Midgard] X [Hibernia]", eChatType.CT_System, eChatLoc.CL_PopupWindow); return true; case "Albion": { player.MoveTo(240, 554371, 583883, 6592, 2039); break; } case "Midgard": { player.MoveTo(240, 554371, 583883, 6592, 2039); break; } case "Hibernia": { player.MoveTo(240, 554371, 583883, 6592, 2039); break; } case "Master Level Area": { player.MoveTo(240, 554371, 583883, 6592, 2039); break; } case "Special PvE Event": { player.MoveTo(240, 554371, 583883, 6592, 2039); break; } } return true; } } }
Greetings Joku!
Joku
DOL Apprentice
 
Posts: 27
Joined: Wed Jul 30, 2014 11:28 am

Re: (solved)New Teleporter error - share-it!

Postby Xanth » Tue Oct 21, 2014 9:58 am

Your Teleporter Script, has no Teleport Effect(cast-effect) for moving one player :)
User avatar
Xanth
DOL Acolyte
 
Posts: 141
Joined: Tue Sep 30, 2014 7:01 pm
Location: Germany

Re: (solved)New Teleporter error - share-it!

Postby Graveen » Tue Oct 21, 2014 10:55 am

Ouch....

Remember Teleporters are implemented into DOL since ages: http://www.dolserver.net/articles/?article=29

Yes, simply ! :p
Image
* pm me to contribute in Dawn of Light: code, database *
User avatar
Graveen
Project Leader
 
Posts: 12660
Joined: Fri Oct 19, 2007 9:22 pm
Location: France

Re: (solved)New Teleporter error - share-it!

Postby Joku » Tue Oct 21, 2014 12:04 pm

Xanth: Your Teleporter Script, has no Teleport Effect(cast-effect) for moving one player :)
Well, yes thats true, but i think its not a must-have on a teleporter ;) - but yea i`ll add that!
Ouch....

Remember Teleporters are implemented into DOL since ages: articles/?article=29

Yes, simply ! :p
well, yes, i looked up for them, but for me personaly, i dont like the "simple-live-like" copies of Realm-Porters,
i wanted something custom, my Server wont be a live-like copy, there are many custom NPCs so why not the teleporter :P
and obviously, changing the Porter`s text ("says: "choose a Destination ... blab bla bla"), isnt that easy ... but thank you for the Link! -

So yes, for now its realy just a simple custom porter, script-based with no use of the teleport db entry!
but in this week ill edit it with full custom text and realm-related Jumppoints - thats the important Thing for me, which i couldnt get fixed with your DOL-Source-live-Porters ...

Greetings - Joku
Joku
DOL Apprentice
 
Posts: 27
Joined: Wed Jul 30, 2014 11:28 am

Re: (solved)New Teleporter error - share-it!

Postby Graveen » Tue Oct 21, 2014 9:34 pm

The link i provided allows you to changing / redoing everything you need.
Image
* pm me to contribute in Dawn of Light: code, database *
User avatar
Graveen
Project Leader
 
Posts: 12660
Joined: Fri Oct 19, 2007 9:22 pm
Location: France


Return to “%s” Support

Who is online

Users browsing this forum: No registered users and 1 guest