int SpellScript::luaActionChangeSpeed(lua_State *L){
long time = (long)lua_tonumber(L, -1)*1000;
lua_pop(L,1);
int speed = (int)lua_tonumber(L, -1);
lua_pop(L,1);
Spell* spell = getSpell(L);
Creature* creature = spell->game->getCreatureByID((unsigned long)lua_tonumber(L, -1));
lua_pop(L,1);
spell->game->addEvent(makeTask(time, boost::bind(&Game::changeSpeed, spell->game,creature->getID(), creature->getNormalSpeed()) ) );
Player* p = dynamic_cast<Player*>(creature);
if(p){
spell->game->changeSpeed(creature->getID(), creature->getNormalSpeed()+speed);
p->sendIcons();
}
creature->hasteTicks = time;
return 0;
}