I was using this bit of code in a mob label to reward everyone who completes an instance event. But the items are never given, I think it doesn't recognize the instance map.
OnEndInstance:
set .@a$, has_instance("1@event");
set .@i, 2000000;
while ( .@i < 2010000 ) {
if ( .@i % 500 == 0 ) sleep 20; // prevent infinite loop
if ( attachrid(.@i) ) {
if( strcharinfo(3) == ".@a$" ) getitem 20951,10;
}
set .@i, .@i +1;
}
warp "Save",0,0;
sleep2 1;
instance_destroy(instance_id(1));
end;
It's supposed to give 10 of an item to everyone who's in an instance generated earlier by the same NPC. But I'm not sure why it won't give any items out.
Question
michaelsoftman
I was using this bit of code in a mob label to reward everyone who completes an instance event. But the items are never given, I think it doesn't recognize the instance map.
It's supposed to give 10 of an item to everyone who's in an instance generated earlier by the same NPC. But I'm not sure why it won't give any items out.
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.