Register for your free account! | Forgot your password?

You last visited: Today at 01:28

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Portitem frage

Discussion on Portitem frage within the WoW Private Server forum part of the World of Warcraft category.

Reply
 
Old   #1
 
_Hardbase_'s Avatar
 
elite*gold: 1
Join Date: Nov 2012
Posts: 39
Received Thanks: 4
Portitem frage

Hallo und frohes Neujahr,

und zwar meine frage ich habe nun ein item erstellt wo man drauf klicken soll und man zum Playertreff geportet wird nun da ist das Problem wie bekomme ich es hin das es portet das item? Gibt bestimmt eine leichte Lösung aber ich finde sie nicht.

also im klar text wo stelle ich es ein das es ein portitem ist item besteht nur das porten geht noch nicht

mfg
_Hardbase_ is offline  
Old 01/01/2015, 21:32   #2
 
elite*gold: 0
Join Date: Aug 2009
Posts: 178
Received Thanks: 34
Post

Trinitycore C++ Script:

Code:
/*
 * Copyright (C) 2015 by Funkybeatz
 */

 
class port_item_script : public ItemScript
{
    public:
 
    port_item_script() : ItemScript("port_item_script") {};
	bool OnUse(Player* player, Item* item, SpellCastTargets const& targets) override
	{	
		player->TeleportTo(MAPID, X, Y, Z, ORIENTATION);
	}
};
void AddSC_port_item_script()
{
    new port_item_script();
}
MAPID, X, Y, Z, ORIENTATION musst du an deine Situation anpassen bevor du kompilierst.

Viel Spaß damit

Nicht vergessen in der DB unter "Item_Template" bei dem jeweiligen Item bei "ScriptName" folgendes einzutragen: port_item_script
winked is offline  
Old 01/01/2015, 22:43   #3
 
_Hardbase_'s Avatar
 
elite*gold: 1
Join Date: Nov 2012
Posts: 39
Received Thanks: 4
Super, vielen dank!
_Hardbase_ is offline  
Old 01/02/2015, 00:14   #4
 
Kaev <3's Avatar
 
elite*gold: 110
Join Date: Mar 2008
Posts: 856
Received Thanks: 388
Quote:
Originally Posted by winked View Post
Trinitycore C++ Script:

Code:
/*
 * Copyright (C) 2015 by Funkybeatz
 */

 
class port_item_script : public ItemScript
{
    public:
 
    port_item_script() : ItemScript("port_item_script") {};
	bool OnUse(Player* player, Item* item, SpellCastTargets const& targets) override
	{	
		player->TeleportTo(MAPID, X, Y, Z, ORIENTATION);
	}
};
void AddSC_port_item_script()
{
    new port_item_script();
}
MAPID, X, Y, Z, ORIENTATION musst du an deine Situation anpassen bevor du kompilierst.

Viel Spaß damit

Nicht vergessen in der DB unter "Item_Template" bei dem jeweiligen Item bei "ScriptName" folgendes einzutragen: port_item_script
Muss das Item nicht noch eine bestimmte Flag haben, damit OnUse getriggert wird? Und eine Spell-ID, welches das ganze auch triggert?
Kaev <3 is offline  
Old 01/02/2015, 10:14   #5

 
elite*gold: 808
Join Date: Jul 2010
Posts: 7,984
Received Thanks: 1,653
Man kann es auch rein Theoretisch per smart_script realisieren. Außerdem muss das Item ne bestimmte Flag haben, sonst nützt auch ein Script nichts.
°"Crazy"° is offline  
Old 01/02/2015, 13:02   #6
 
elite*gold: 0
Join Date: Aug 2009
Posts: 178
Received Thanks: 34
Ich bin davon ausgegangen, dass man das selbst weiß^^.

Wenn nicht:

Flags: 64
SpellID: 18282
winked is offline  
Reply




All times are GMT +2. The time now is 01:28.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.