Finding any information on the changes to SD3 has been, well, let's just say I wont need a hair anytime soon. I have pulled all my hair out.
Everything looks about the same with SD3, but I cannot get any of my custom scripts to work. This is a small script, that has a couple of checks (IsInCombat, IsMoving)
This script summons an npc when you right click an item... or that is how it is supposed to work.
#include"precompiled.h"struct summon :publicCreatureScript{
summon():CreatureScript("summon"){}boolItemUse_item_icerune(Player* pPlayer,Item* pItem,SpellCastTargetsconst&/*targets*/){uint32 sSpell =18282;//Icerune Visual Spell when usedif(pPlayer->IsInCombat()){
pPlayer->GetSession()->SendNotification("You are in combat.");}elseif(pPlayer->isMoving()){
pPlayer->GetSession()->SendNotification("You can not do that while moving.");}else{float x, y, z, o = pPlayer->GetOrientation();
o = o +3.141592;Creature* pCreature = pPlayer->SummonCreature(100000,pPlayer->GetPositionX(),pPlayer->GetPositionY(), pPlayer->GetPositionZ()+2,0,TEMPSUMMON_TIMED_DESPAWN,120000);
pCreature->CastSpell(pCreature,40162,true);returnfalse;}returnfalse;}};voidAddSC_summon(){Script* s;
s =new summon();
s->RegisterSelf();}
I have added an entry into script_bindings. I do not get any errors in the scripdev3 logs (except something about ale... unrelated)
During compile I watch it check the cpp file, and there are no errors. Right clicking on the item does nothing. What am I missing?
EDIT: to test to see if the script was seen by the core, I removed the scipt_binding entry. I got: 2017-01-03 06:53:04 Script registering but ScriptName summon is not assigned in database. Script will not be used. so I know the core sees it. I just cant click on the item.
Question
LordPsyan
Finding any information on the changes to SD3 has been, well, let's just say I wont need a hair anytime soon. I have pulled all my hair out.
Everything looks about the same with SD3, but I cannot get any of my custom scripts to work. This is a small script, that has a couple of checks (IsInCombat, IsMoving)
This script summons an npc when you right click an item... or that is how it is supposed to work.
I have added an entry into script_bindings. I do not get any errors in the scripdev3 logs (except something about ale... unrelated)
During compile I watch it check the cpp file, and there are no errors. Right clicking on the item does nothing. What am I missing?
EDIT: to test to see if the script was seen by the core, I removed the scipt_binding entry. I got: 2017-01-03 06:53:04 Script registering but ScriptName summon is not assigned in database. Script will not be used. so I know the core sees it. I just cant click on the item.
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.