Post Pacific

Post Pacific (https://postpacific.mmorpg-game.online/index.php)
-   Темы без сохранившегося раздела (https://postpacific.mmorpg-game.online/forumdisplay.php?f=10001)
-   -   AI Help on determining level difference between PC and Mob (https://postpacific.mmorpg-game.online/showthread.php?t=2719)

montejo1974 03.12.2005 18:39

AI Help on determining level difference between PC and Mob
 
Hi, ppl...

Im building an event for Christmas. I would like to know how to determine the difference of leves between the mob and the last attacker...

I dont know If there is a function to retrieve the level of the monster, or a variable that maintain the monster level and the last attacker level....

Thanks in advance.

kvoxi 03.12.2005 19:49

PC_level=GetLastAttacker().level;
NPC_level=myself.sm.level;
AI code:
Code:

        //PC level
        //c0=GetLastAttacker()
        push_event      //  c0
        push_const 272
        add
        push_reg_sp
        fetch_i
        shift_sp 1
        func_call 83    //  func[GetLastAttacker]
        assign
        shift_sp -1
        // PC_level <=> c0.level
        push_event      //  c0
        push_const 272
        add
        fetch_i
        push_const 888 //level
        add
        fetch_i
        ....

        // NPC level
        push_event      //  myself
        push_const 28
        add
        fetch_i //  sm
        push_const 2400
        add
        fetch_i //  level
        push_const 888
        add
        fetch_i

thats all, if u need determine levels

montejo1974 03.12.2005 19:54

Thank you very much, this will be very useful for me ;)...I will try it soon


All times are GMT. The time now is 21:49.