#dyn 0x 740000
#org @start
lock
checkflag 0xZZYY 'checks for this script being executed before
compare LASTRESULT 'compare the last result
if true jump @empty 'if it has been executed before, jump to the "@empty" label
jump @givepoke 'otherwise, give the pokemon
#org @empty
message @isemptymsg
callstd MSG_NORMAL
release
end
#org @isemptymsg
= It's empty...
#org @givepoke
givepokemon 0xSPECIES 0xLEVEL ITEM 0 0 0 'adds pokemon
callstd MSG_OBTAIN 'the default obtained XXX Y's message
setflag 0xZZYY 'ensures the script that it's been executed once before
release 'allows for movement
end 'Ends script
i've not tested that yet, so i'm sure there are bugs, but that is the general idea.
although i am curious, why not just remove the pokeball from the map after it has been called?
Well, using the PKSV thingy i made a give pokemon script and it works perfectly... But i can't make the pokeball leave an 'it's empty' message when you click on it again... I've tried flags and everything but i can't get it to work... Can you help?