super stimpack exploit

Nirran

Vault Senior Citizen
Modder
this sfall script eliminates the exploit,if the target is a critter and not dude or a party member and the target has full health,this script will send a messege to the player and delete all the super stimpacks in the players inven

Code:
#include "..\..\HEADERS\ITEMPID.H"
#include "..\..\HEADERS\CRITRPID.H"
#include "..\..\HEADERS\Scale_Diff.h"
#include "..\..\HEADERS\sfall.h"
#include "..\..\HEADERS\Perk_Inc.h"

procedure start;

procedure start begin
   variable user;
   variable target;
   variable item;
   variable number_items_remove;
   variable delete_item;
   if(game_loaded) then 
      begin
         register_hook(HOOK_USEOBJON);
      end 
   else 
      begin
         target := get_sfall_arg;
         user := get_sfall_arg;
         item := get_sfall_arg;
         //display_msg("user " + obj_pid(user) + "dude " + obj_pid(dude_obj));
         //display_msg("target " + target);
         //display_msg("item " + item);
         if(user == dude_obj) then 
            begin
               //display_msg("dude");
               if (obj_pid(item) == PID_SUPER_STIMPAK) then 
                  begin
                     //display_msg("super stim");
                     if (is_not_party(target)) then 
                        begin
                           //display_msg("not party"); 
                           if((obj_pid(target_obj) - 16777216) >= 0) and ((obj_pid(target_obj) - 33554431) <0> 0) then 
                                          begin                                    
                                             while(obj_is_carrying_obj_pid(dude_obj, PID_SUPER_STIMPAK) > 0) do 
                                                begin                                 
                                                   delete_item := obj_carrying_pid_obj(dude_obj, PID_SUPER_STIMPAK);                                     
                                                   rm_obj_from_inven(dude_obj, delete_item);                                                       
                                                   if(tile_contains_obj_pid(0, 1, PID_SUPER_STIMPAK)) then 
                                                      begin                                     
                                                         delete_item := tile_contains_pid_obj(0, 1, PID_SUPER_STIMPAK);                                 
                                                         destroy_object(delete_item);                                                             
                                                      end                                                                                         
                                                   number_items_remove := number_items_remove + 1;                                             
                                                end 
                                             if(number_items_remove == 1) then 
                                                begin                                                                                           
                                                   display_msg("CHEATER,SINCE YOU TRIED TO USE AN EXPLOIT,WE HAVE DELETED YOUR SUPER STIMPACK,BET YOU DONT TRY THAT AGAIN LOL");
                                                end 
                                             else 
                                                if(number_items_remove > 1) then 
                                                   begin 
                                                      display_msg("CHEATER,SINCE YOU TRIED TO USE AN EXPLOIT,WE HAVE DELETED ALL "+ number_items_remove + " OF YOUR SUPER STIMPACKS,BET YOU DONT TRY THAT AGAIN LOL"); 
                                                   end                                                                   
                                          end 
                                    end
                              end
                        end
                  end                                                                                                     
            end
      end
end

is_not_party is simply (obj_pid(target ) != pid_sulik) for example,passing all the party members in the game

Nirran
 
Yeah. Wouldn't it make more sense if it simply wrote that the person resists?
 
i would do that if i had a way of stopping the neg effects,but corrently i dont

Nirran
 
Back
Top