Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setunitdata #462

Closed
julia40124009 opened this issue Jun 13, 2015 · 4 comments
Closed

setunitdata #462

julia40124009 opened this issue Jun 13, 2015 · 4 comments
Labels
component:core A fault that lies within the main framework of rAthena mode:prerenewal A fault that exists within the pre-renewal mode mode:renewal A fault that exists within the renewal mode priority:low A fault that affects rAthena in one piece of functionality and is self-contained

Comments

@julia40124009
Copy link

test script

prt_fild08,149,360,4 script npcname 47,{
setarray .init,0;
setunitdata getnpcid(0,"npcname"),2,1111; // set HP 1111
setunitdata getnpcid(0,"npcname"),3,1024; // set max HP 1024
setunitdata getnpcid(0,"npcname"),8,9999; // set STR 9999
setunitdata getnpcid(0,"npcname"),9,9999; // set AGI 9999
setunitdata getnpcid(0,"npcname"),10,9999; // set VIT 9999
setunitdata getnpcid(0,"npcname"),11,9999; // set INT 9999
setunitdata getnpcid(0,"npcname"),12,9999; // set DEX 9999
setunitdata getnpcid(0,"npcname"),13,9999; // set LUK 9999

// show info
getunitdata getnpcid(0,"npcname"),.init; // get npc data
for(set .@i,0; .@i<getarraysize(.init); .@i++)
mes ""+.init[.@i];
close;
}

npc parameter (indexes)
2,3,8,9,10,11,12,13
Seem not work

version : 5a4cd74

@cydh
Copy link
Contributor

cydh commented Jun 14, 2015

I'm worried that getunitdata isn't working properly
I thought that number means 'the getunitdata returns the indexes instead of the data.'
let see, well...
setunitdata for NPC is set to nd->status, but that struct is recalculated on status_calc_npc_

// for STR, AGI, VIT, INT, DEX, LUK

    status->str = nd->stat_point;
    status->agi = nd->stat_point;
    status->vit = nd->stat_point;
    status->int_= nd->stat_point;
    status->dex = nd->stat_point;
    status->luk = nd->stat_point;

maybe was related with #449 that nd->status isn't calculated at first NPC definition such in npc_parse_script

@julia40124009
Copy link
Author

https://rathena.org/board/topic/70561-mob-control-commands/?p=285891
If such a change
npc Max HP work fine

@julia40124009
Copy link
Author

and setunitdata to mob

set .gid,bg_monster(1,"prt_fild08",152,357,"--ja--",1002,"npcname"+"::OnEventMobDead");
setunitdata .gid,2,99999;
setunitdata .gid,3,99999;

not work for monster ...

this command seem many problem

@cydh cydh added status:confirmed Issue that has been validated by a developer to affect rAthena component:core A fault that lies within the main framework of rAthena labels Jun 14, 2015
@cydh
Copy link
Contributor

cydh commented Jun 14, 2015

thank you for reporting. needs some trick to make this perfect.
or maybe I want something like ... change the values simultaneously based on array value.

@cydh cydh closed this as completed in b71ed05 Jun 16, 2015
@aleos89 aleos89 added priority:low A fault that affects rAthena in one piece of functionality and is self-contained server:map mode:renewal A fault that exists within the renewal mode mode:prerenewal A fault that exists within the pre-renewal mode and removed status:confirmed Issue that has been validated by a developer to affect rAthena labels Sep 30, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:core A fault that lies within the main framework of rAthena mode:prerenewal A fault that exists within the pre-renewal mode mode:renewal A fault that exists within the renewal mode priority:low A fault that affects rAthena in one piece of functionality and is self-contained
Projects
None yet
Development

No branches or pull requests

3 participants